Conversation
aria-label start, previous etc aria-hidden=true add nav
| if ($icon !== null) | ||
| { | ||
| $display = '<span class="' . $icon . '"></span>'; | ||
| $display = '<span class="' . $icon . ' aria-hidden="true"></span>'; |
There was a problem hiding this comment.
Add closing " to the class attribute.
| <?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; ?>"> |
|
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 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.
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.
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.
ok should be fixed now - thanks
| <?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; ?>"> |
| <?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) . '"' : '' ?>> |
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