-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Isis Pagination update #18357
Isis Pagination update #18357
Conversation
aria-label start, previous etc aria-hidden=true add nav
break; | ||
} | ||
|
||
$item->text .= $addText ?: ''; | ||
|
||
if ($icon !== null) | ||
{ | ||
$display = '<span class="' . $icon . '"></span>'; | ||
$display = '<span class="' . $icon . ' aria-hidden="true"></span>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add closing "
to the class
attribute.
@@ -95,12 +100,14 @@ | |||
?> | |||
<?php if ($displayData['active']) : ?> | |||
<li<?php echo $liClass ? ' class="' . $liClass . '"' : ''; ?>> | |||
<a <?php echo $cssClasses ? 'class="' . implode(' ', $cssClasses) . '"' : ''; ?> <?php echo $title; ?> href="#" onclick="<?php echo $onClick; ?>"> | |||
<a aria-label="<?php echo $aria;?>" <?php echo $cssClasses ? 'class="' . implode(' ', $cssClasses) . '"' : ''; ?> <?php echo $title; ?> href="#" onclick="<?php echo $onClick; ?>"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add space after $aria;
See output.
|
no that looks wrong - i will check it again later |
@Quy open to suggestions/help - the code here is a bit funky |
<?php echo $display; ?> | ||
</a> | ||
</li> | ||
<?php else : ?> | ||
<li class="<?php echo $class; ?>"> | ||
<span><?php echo $display; ?></span> | ||
<span aria-current="true" aria-label="<?php echo JText::sprintf('JLIB_HTML_PAGE_CURRENT', $item->text); ?>"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should do the trick. Please test.
<span <?php echo $class == 'active' ? 'aria-current="true"' : '' ?> aria-label="<?php echo JText::sprintf('JLIB_HTML_PAGE_CURRENT', $item->text); ?>">
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats similar to one of the things i tried - but it doesnt work as it produces
<li class="disabled">
<span aria-label="JLIB_HTML_PAGE_CURRENT">
<span class="icon-step-backward icon-previous" aria-hidden="true"></span>
</span>
</li>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok should be fixed now - thanks
@@ -95,12 +100,14 @@ | |||
?> | |||
<?php if ($displayData['active']) : ?> | |||
<li<?php echo $liClass ? ' class="' . $liClass . '"' : ''; ?>> | |||
<a <?php echo $cssClasses ? 'class="' . implode(' ', $cssClasses) . '"' : ''; ?> <?php echo $title; ?> href="#" onclick="<?php echo $onClick; ?>"> | |||
<a aria-label="<?php echo $aria ;?>" <?php echo $cssClasses ? 'class="' . implode(' ', $cssClasses) . '"' : ''; ?> <?php echo $title; ?> href="#" onclick="<?php echo $onClick; ?>"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the space after ;
<?php echo $display; ?> | ||
</a> | ||
</li> | ||
<?php else : ?> | ||
<li class="<?php echo $class; ?>"> | ||
<span><?php echo $display; ?></span> | ||
<span <?php echo $class == 'active' ? 'aria-current="true" aria-label="' . JText::sprintf('JLIB_HTML_PAGE_CURRENT', $item->text) . '"' : '' ?>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add semicolon after : ''
Thanks @Quy
I have tested this item ✅ successfully on 94bb83c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18357. |
@Quy can you please explain how the Code looks without and with Pull Request? This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18357. |
I have tested this item ✅ successfully on 94bb83c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18357. |
RTC after two successful tests. |
Thanks |
Improve the accessibility of the pagination - there are no visual changes
Note 1
This PR does not include the language strings as they were added in #18326
Note 2
I dont know why but isis and protostar (see #18326) use an override for pagination instead of the layout. For b/c this PR is just for the override but when approved I will do a similar PR for the layout
Thanks to @fuzzbomb (Drupal 8 Core Accessibility Maintainer) for his advice and reviewing this