Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADA compliance #320

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions includes/calendars/views/default-calendar-grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ public function html() {
<thead class="simcal-calendar-head">
<tr>
<?php if ( ! $calendar->static ) { ?>
<th class="simcal-nav simcal-prev-wrapper" colspan="<?php echo apply_filters( 'simcal_prev_cols', '1' ); ?>">
<button class="simcal-nav-button simcal-month-nav simcal-prev" title="<?php _e( 'Previous Month', 'google-calendar-events' ); ?>"><i class="simcal-icon-left"></i></button>
</th>
<td class="simcal-nav simcal-prev-wrapper" colspan="<?php echo apply_filters( 'simcal_prev_cols', '1' ); ?>">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interested to know why this changed from th to td?

<button class="simcal-nav-button simcal-month-nav simcal-prev" title="<?php _e( 'Previous Month', 'google-calendar-events' ); ?>"><i class="simcal-icon-left"></i><span style="display:none;"><?php _e( 'Previous Month', 'google-calendar-events' ); ?></span></button>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use ARIA instead of adding a hidden text?

</td>
<?php } ?>
<th colspan="<?php echo apply_filters( 'simcal_current_cols', $calendar->static ? '7' : '5' ); ?>"
class="simcal-nav simcal-current"
Expand Down Expand Up @@ -231,9 +231,9 @@ class="simcal-nav simcal-current"
?>
</th>
<?php if ( ! $calendar->static ) { ?>
<th class="simcal-nav simcal-next-wrapper" colspan="<?php echo apply_filters( 'simcal_next_cols', '1' ); ?>">
<button class="simcal-nav-button simcal-month-nav simcal-next" title="<?php _e( 'Next Month', 'google-calendar-events' ); ?>"><i class="simcal-icon-right"></i></button>
</th>
<td class="simcal-nav simcal-next-wrapper" colspan="<?php echo apply_filters( 'simcal_next_cols', '1' ); ?>">
<button class="simcal-nav-button simcal-month-nav simcal-next" title="<?php _e( 'Next Month', 'google-calendar-events' ); ?>"><i class="simcal-icon-right"></i><span style="display:none;"><?php _e( 'Next Month', 'google-calendar-events' ); ?></span></button>
</td>
<?php } ?>
</tr>
<tr>
Expand Down
2 changes: 2 additions & 0 deletions includes/calendars/views/default-calendar-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ public function html() {
echo "\t" . '<div class="simcal-nav">' . "\n";
echo "\t\t" . '<button class="simcal-nav-button simcal-prev" title="' . __('Previous', 'google-calendar-events') . '"' . $disabled . '>' . "\n";
echo "\t\t\t" . '<i class="simcal-icon-left"></i>' . "\n";
echo "\t\t\t" . '<span style="display:none;">' . __('Previous', 'google-calendar-events') . '</span>' . "\n";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, can we can use ARIA in the above line?

echo "\t\t" . '</button>' . "\n";
echo "\t" . '</div>' . "\n";

Expand All @@ -219,6 +220,7 @@ public function html() {
echo "\t" . '<div class="simcal-nav">';
echo "\t\t" . '<button class="simcal-nav-button simcal-next" title="' . __('Next', 'google-calendar-events') . '"' . $disabled . '>';
echo "\t\t\t" . '<i class="simcal-icon-right"></i>' . "\n";
echo "\t\t\t" . '<span style="display:none;">' . __('Next', 'google-calendar-events') . '</span>' . "\n";
echo "\t\t" . '</button>' . "\n";
echo "\t" . '</div>' . "\n";

Expand Down