Skip to content

Commit

Permalink
feat: Add Bootstrap 5 sr-only equivelant class
Browse files Browse the repository at this point in the history
Bootstrap changed from `sr-only` to `visully-hidden` from version 4 to 5
  • Loading branch information
zooley committed Apr 2, 2024
1 parent 793a08a commit b508fc8
Show file tree
Hide file tree
Showing 139 changed files with 757 additions and 746 deletions.
2 changes: 1 addition & 1 deletion app/Listeners/Captcha/Image/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<span class="input-group-text">
<a href="#captchaCode" class="captcha-refresh tip" title="{{ trans('listener.captcha.image::image.refresh captcha') }}">
<span class="fa fa-repeat" aria-hidden="true"></span>
<span class="sr-only">{{ trans('listener.captcha.image::image.refresh captcha') }}</span>
<span class="sr-only visually-hidden">{{ trans('listener.captcha.image::image.refresh captcha') }}</span>
</a>
</span>
</span>
Expand Down
16 changes: 8 additions & 8 deletions app/Listeners/Users/Activity/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div class="row">
<div class="col filter-search col-md-6">
<label class="sr-only" for="filter_action">{{ trans('history::history.transport') }}</label>
<label class="sr-only visually-hidden" for="filter_action">{{ trans('history::history.transport') }}</label>
<select name="action" id="filter_action" class="form-control filter filter-submit">
<option value=""<?php if ($filters['action'] == ''): echo ' selected="selected"'; endif;?>>{{ trans('history::history.all actions') }}</option>
<option value="emailed"<?php if ($filters['action'] == 'emailed'): echo ' selected="selected"'; endif;?>>Emailed</option>
Expand All @@ -16,7 +16,7 @@
</select>
</div>
<div class="col filter-search col-md-4">
<label class="sr-only" for="filter_status">{{ trans('history::history.status') }}</label>
<label class="sr-only visually-hidden" for="filter_status">{{ trans('history::history.status') }}</label>
<select name="status" id="filter_status" class="form-control filter filter-submit">
<option value=""<?php if ($filters['status'] == ''): echo ' selected="selected"'; endif;?>>{{ trans('history::history.all status') }}</option>
<option value="success"<?php if ($filters['status'] == 'success'): echo ' selected="selected"'; endif;?>>{{ trans('listener.users.activity::activity.success') }}</option>
Expand All @@ -33,7 +33,7 @@

@if (count($history) > 0)
<?php /*<table class="table table-hover adminlist">
<caption class="sr-only">{{ trans('history::history.activity') }}</caption>
<caption class="sr-only visually-hidden">{{ trans('history::history.activity') }}</caption>
<thead>
<tr>
<th scope="col" class="text-center">
Expand Down Expand Up @@ -61,10 +61,10 @@
<td class="text-center">
@if ($row->status >= 400)
<span class="fa fa-exclamation-triangle text-danger" aria-hidden="true"></span>
<span class="sr-only">{{ trans('listener.users.activity::activity.error') }} - {{ $row->status }}</span>
<span class="sr-only visually-hidden">{{ trans('listener.users.activity::activity.error') }} - {{ $row->status }}</span>
@else
<span class="fa fa-check-circle text-success" aria-hidden="true"></span>
<span class="sr-only">{{ trans('listener.users.activity::activity.success') }}</span>
<span class="sr-only visually-hidden">{{ trans('listener.users.activity::activity.success') }}</span>
@endif
</td>
<td>
Expand Down Expand Up @@ -113,7 +113,7 @@
<div class="col-md-1 text-right">
@if ($row->datetime)
<time datetime="{{ $row->datetime->toDateTimeLocalString() }}">
<span class="sr-only">{{ $row->datetime->format('M j, Y') }}</span> {{ $row->datetime->format('g:ia') }}
<span class="sr-only visually-hidden">{{ $row->datetime->format('M j, Y') }}</span> {{ $row->datetime->format('g:ia') }}
</time>
@else
<span class="text-muted never">{{ trans('global.unknown') }}</span>
Expand All @@ -122,10 +122,10 @@
<div class="col-md-1 text-center">
@if ($row->status >= 400)
<span class="fa fa-exclamation-triangle text-danger" aria-hidden="true"></span>
<span class="sr-only">{{ trans('listener.users.activity::activity.error') }} - {{ $row->status }}</span>
<span class="sr-only visually-hidden">{{ trans('listener.users.activity::activity.error') }} - {{ $row->status }}</span>
@else
<span class="fa fa-check-circle text-success" aria-hidden="true"></span>
<span class="sr-only">{{ trans('listener.users.activity::activity.success') }}</span>
<span class="sr-only visually-hidden">{{ trans('listener.users.activity::activity.success') }}</span>
@endif
</div>
<div class="col-md-10">
Expand Down
2 changes: 1 addition & 1 deletion app/Listeners/Users/Sessions/views/profile.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h3 class="card-title my-0">
{{ trans('listener.users.sessions::sessions.sessions') }}
<a href="#sessions_help" data-toggle="modal" class="text-info tip" title="Roles Help">
<span class="fa fa-question-circle" aria-hidden="true"></span><span class="sr-only">Help</span>
<span class="fa fa-question-circle" aria-hidden="true"></span><span class="sr-only visually-hidden">Help</span>
</a>
</h3>
<div class="modal" id="sessions_help" tabindex="-1" aria-labelledby="sessions_help-title" aria-hidden="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
<fieldset id="filter-bar" class="container-fluid">
<div class="row">
<div class="col col-md-4 filter-search">
<label class="sr-only" for="filter_search">search</label>
<label class="sr-only visually-hidden" for="filter_search">search</label>
<input type="text" name="search" id="filter_search" class="form-control filter" placeholder="keyword or phrase..." value="" />

<button class="btn btn-secondary" type="submit">submit</button>
</div>
<div class="col col-md-8 filter-select text-right">
<label class="sr-only" for="filter_state">state</label>
<label class="sr-only visually-hidden" for="filter_state">state</label>
<select name="state" class="form-control filter filter-submit">
<option value="*">all states</option>
<option value="published">published</option>
<option value="unpublished">unpublished</option>
</select>

<label class="sr-only" for="filter-access">access level</label>
<label class="sr-only visually-hidden" for="filter-access">access level</label>
<select name="access" id="filter-access" class="form-control filter filter-submit">
<option value="*">select level</option>
<option v-for="(level, i) in levels" :key="i" :value="level.id">{{ level.title }}</option>
</select>

<label class="sr-only" for="filter-type">Type</label>
<label class="sr-only visually-hidden" for="filter-type">Type</label>
<select name="type" id="filter-type" class="form-control filter filter-submit">
<option value="0">all categories</option>
</select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<form action="{{ route('admin.contactreports.comments', ['report' => $report->id]) }}" method="get" name="adminForm" id="adminForm" class="form-inline">

<fieldset id="filter-bar">
<label class="sr-only" for="filter_search">{{ trans('search.label') }}</label>
<label class="sr-only visually-hidden" for="filter_search">{{ trans('search.label') }}</label>
<input type="text" name="search" id="filter_search" class="form-control filter" placeholder="{{ trans('search.placeholder') }}" value="{{ $filters['search'] }}" />

<input type="hidden" name="order" value="{{ $filters['order'] }}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
<fieldset id="filter-bar" class="container-fluid">
<div class="form-group">
<div class="form-group">
<label class="sr-only" for="filter_search">{{ trans('search.label') }}</label>
<label class="sr-only visually-hidden" for="filter_search">{{ trans('search.label') }}</label>
<span class="input-group">
<input type="text" name="search" id="filter_search" class="form-control filter" placeholder="{{ trans('search.placeholder') }}" value="{{ $filters['search'] }}" />
<span class="input-group-append"><button type="submit" class="input-group-text"><span class="fa fa-search" aria-hidden="true"></span><span class="sr-only">{{ trans('search.submit') }}</span></button></span>
<span class="input-group-append"><button type="submit" class="input-group-text"><span class="fa fa-search" aria-hidden="true"></span><span class="sr-only visually-hidden">{{ trans('search.submit') }}</span></button></span>
</span>
</div>
</div>
Expand Down Expand Up @@ -395,7 +395,7 @@
$u .= ($user->user ? $user->user->name : $user->userid . ' <span class="unknown">' . trans('global.unknown') . '</span>');
if ($user->notified()):
$u .= ' <span class="fa fa-envelope" data-tip="Followup email sent on ' . $user->datetimelastnotify->toDateTimeString() . '"><time class="sr-only" datetime="' . $user->datetimelastnotify->toDateTimeString() . '">' . $user->datetimelastnotify->format('Y-m-d') . '</time></span>';
$u .= ' <span class="fa fa-envelope" data-tip="Followup email sent on ' . $user->datetimelastnotify->toDateTimeString() . '"><time class="sr-only visually-hidden" datetime="' . $user->datetimelastnotify->toDateTimeString() . '">' . $user->datetimelastnotify->format('Y-m-d') . '</time></span>';
endif;
$u .= '</a>';
Expand Down Expand Up @@ -475,7 +475,7 @@
</div>
<div id="comment_{{ $comment->id }}_edit" class="show-when-editing">
<div class="form-group">
<label for="comment_{{ $comment->id }}_comment" class="sr-only">{{ trans('contactreports::contactreports.comment') }}</label>
<label for="comment_{{ $comment->id }}_comment" class="sr-only visually-hidden">{{ trans('contactreports::contactreports.comment') }}</label>
<!-- <textarea name="comment" id="comment_{{ $comment->id }}_comment" class="form-control" cols="45" rows="3">{{ $comment->comment }}</textarea> -->
{!! markdown_editor('comment', $comment->comment, ['rows' => 2, 'id' => 'comment_' . $comment->id . '_comment']) !!}
</div>
Expand Down Expand Up @@ -511,7 +511,7 @@
</div>
<div id="comment_<?php echo '{id}'; ?>_edit" class="show-when-editing">
<div class="form-group">
<label for="comment_<?php echo '{id}'; ?>_comment" class="sr-only">{{ trans('contactreports::contactreports.comment') }}</label>
<label for="comment_<?php echo '{id}'; ?>_comment" class="sr-only visually-hidden">{{ trans('contactreports::contactreports.comment') }}</label>
<textarea name="comment" id="comment_<?php echo '{id}'; ?>_comment" class="form-control md" cols="45" rows="3"></textarea>
</div>
<div class="form-group text-right">
Expand Down Expand Up @@ -539,7 +539,7 @@
</li>
<li id="comment_new{{ $row->id }}" data-api="{{ route('api.contactreports.comments.create') }}">
<div class="form-group">
<label for="comment_new{{ $row->id }}_comment" class="sr-only">{{ trans('contactreports::contactreports.comment') }}</label>
<label for="comment_new{{ $row->id }}_comment" class="sr-only visually-hidden">{{ trans('contactreports::contactreports.comment') }}</label>
{!! markdown_editor('comment', '', ['rows' => 2, 'id' => 'comment_new' . $row->id . '_comment']) !!}
</div>
<div class="form-group text-right">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
<fieldset id="filter-bar" class="container-fluid">
<div class="row">
<div class="col col-md-12 text-right">
<label class="sr-only" for="filter_start">Start date</label>
<label class="sr-only visually-hidden" for="filter_start">Start date</label>
<input type="text" name="start" id="filter_start" class="form-control date filter filter-submit" value="{{ $filters['start'] }}" placeholder="Start date" />
to
<label class="sr-only" for="filter_end">End date</label>
<label class="sr-only visually-hidden" for="filter_end">End date</label>
<input type="text" name="end" id="filter_end" class="form-control date filter filter-submit" value="{{ $filters['end'] }}" placeholder="End date" />

<button type="submit" class="btn btn-secondary">Filter</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
<div class="row">
<div class="col col-md-12 filter-search">
<div class="form-group">
<label class="sr-only" for="filter_search">{{ trans('search.label') }}</label>
<label class="sr-only visually-hidden" for="filter_search">{{ trans('search.label') }}</label>
<span class="input-group">
<input type="text" name="search" id="filter_search" class="form-control filter" placeholder="{{ trans('search.placeholder') }}" value="{{ $filters['search'] }}" />
<span class="input-group-append"><button type="submit" class="input-group-text"><span class="fa fa-search" aria-hidden="true"></span><span class="sr-only">{{ trans('search.submit') }}</span></button></span>
<span class="input-group-append"><button type="submit" class="input-group-text"><span class="fa fa-search" aria-hidden="true"></span><span class="sr-only visually-hidden">{{ trans('search.submit') }}</span></button></span>
</span>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div class="card mb-4">
<div class="table-responsive">
<table class="table table-hover adminlist">
<caption class="sr-only">{{ trans('core::modules.module manager') }}</caption>
<caption class="sr-only visually-hidden">{{ trans('core::modules.module manager') }}</caption>
<thead>
<tr>
<th scope="col">
Expand Down
8 changes: 4 additions & 4 deletions app/Modules/Core/Resources/views/site/docs/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@stack('scripts')
</head>
<body>
<header class="sr-only">
<header class="sr-only visually-hidden">
<div class="top">
<h1>{{ config('app.name') }}</h1>
</div>
Expand All @@ -46,7 +46,7 @@
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
<span class="sr-only">{{ trans('core::docs.menu') }}</span>
<span class="sr-only visually-hidden">{{ trans('core::docs.menu') }}</span>
</a>
</div>
<ul class="docs-sidebar-tree" id="endpoints">
Expand Down Expand Up @@ -173,7 +173,7 @@
<div class="table-container">
@if (count($endpoint['parameters']) > 0)
<table class="table mb-0">
<caption class="sr-only">{{ trans('core::docs.parameters') }}</caption>
<caption class="sr-only visually-hidden">{{ trans('core::docs.parameters') }}</caption>
<thead>
<tr>
<th scope="col">{{ trans('core::docs.name') }}</th>
Expand Down Expand Up @@ -403,7 +403,7 @@
</div>
<div class="response-container">
<table class="table mb-0">
<caption class="sr-only">{{ trans('core::docs.response codes') }}</caption>
<caption class="sr-only visually-hidden">{{ trans('core::docs.response codes') }}</caption>
<thead>
<tr>
<th scope="col">{{ trans('core::docs.code') }}</th>
Expand Down
2 changes: 1 addition & 1 deletion app/Modules/Finder/Resources/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ $(document).ready(function () {
// instead of labels, we have field_data[field]["label"]

var help_text_counter = 0;
var chart = '<caption class="sr-only">Comparison of services</caption><thead><tr><td></td>';
var chart = '<caption class="sr-only visually-hidden">Comparison of services</caption><thead><tr><td></td>';
for (i = 0; i < servicelist.length; i++) {
chart = chart + "<th class='service service-" + servicelist[i].id + "' scope='col'>" + servicelist[i]["title"] + "</th>";
}
Expand Down
2 changes: 1 addition & 1 deletion app/Modules/Finder/Resources/assets/js/cwd_utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ var msie = document.documentMode;
$(main_nav_focus_target).focus();
});
});
$('#mobile-home').after('<a id="mobile-close" href="#"><span class="sr-only">Close Menu</span></a>');
$('#mobile-home').after('<a id="mobile-close" href="#"><span class="sr-only visually-hidden">Close Menu</span></a>');
$('#mobile-close').click(function(e) {
e.preventDefault();
$('#main-navigation, #mobile-nav-dimmer').fadeOut(100,function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<div class="col-md-2 text-right">
<button class="btn remove-choice" data-confirm="{{ trans('finder::finder.confirm delete') }}" data-target="#choice-{{ $k }}">
<span class="fa fa-trash text-danger" aria-hidden="true" data-tip="{{ trans('finder::finder.remove choice') }}"></span>
<span class="sr-only">{{ trans('finder::finder.remove choice') }}</span>
<span class="sr-only visually-hidden">{{ trans('finder::finder.remove choice') }}</span>
</button>
</div>
</div>
Expand Down Expand Up @@ -158,7 +158,7 @@
<div class="col-md-2 text-right">
<button class="btn remove-choice" data-confirm="{{ trans('finder::finder.confirm delete') }}" data-target="#choice-<?php echo '{{i}}'; ?>">
<span class="fa fa-trash text-danger" aria-hidden="true" data-tip="{{ trans('finder::finder.remove choice') }}"></span>
<span class="sr-only">{{ trans('finder::finder.remove choice') }}</span>
<span class="sr-only visually-hidden">{{ trans('finder::finder.remove choice') }}</span>
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@
<div class="row">
<div class="col-md-3 filter-search">
<div class="form-group">
<label class="sr-only" for="filter_search">{{ trans('search.label') }}</label>
<label class="sr-only visually-hidden" for="filter_search">{{ trans('search.label') }}</label>
<span class="input-group">
<input type="text" name="search" id="filter_search" class="form-control filter" placeholder="{{ trans('search.placeholder') }}" value="{{ $filters['search'] }}" />
<span class="input-group-append"><button type="submit" class="btn input-group-text"><span class="fa fa-search" aria-hidden="true"></span><span class="sr-only">{{ trans('search.submit') }}</span></button></span>
<span class="input-group-append"><button type="submit" class="btn input-group-text"><span class="fa fa-search" aria-hidden="true"></span><span class="sr-only visually-hidden">{{ trans('search.submit') }}</span></button></span>
</span>
</div>
</div>
<div class="col col-md-9 text-right">
<label class="sr-only" for="filter_state">{{ trans('finder::finder.state') }}</label>
<label class="sr-only visually-hidden" for="filter_state">{{ trans('finder::finder.state') }}</label>
<select name="state" class="form-control filter filter-submit">
<option value="*"<?php if ($filters['state'] == '*'): echo ' selected="selected"'; endif;?>>{{ trans('finder::finder.state_all') }}</option>
<option value="published"<?php if ($filters['state'] == 'published'): echo ' selected="selected"'; endif;?>>{{ trans('global.published') }}</option>
Expand All @@ -71,7 +71,7 @@
<div class="card mb-4">
<div class="table-responsive">
<table class="table table-hover adminlist">
<caption class="sr-only">{{ trans('finder::finder.finder') }}</caption>
<caption class="sr-only visually-hidden">{{ trans('finder::finder.finder') }}</caption>
<thead>
<tr>
@if (auth()->user()->can('delete finder'))
Expand Down
Loading

0 comments on commit b508fc8

Please sign in to comment.