-
Notifications
You must be signed in to change notification settings - Fork 238
fix(vertical nav) improve accessibility support #766
Conversation
I have several questions/comments about these updates, and didn't want to note all of them above... @andresgalante , these are some of the html/css related questions/comments:
@jeff-phillips-18, can you clarify what the purpose of |
5fc363e
to
e51fad9
Compare
Closes #723 |
@jgiardino I don't believe the data-target is used any more, it was originally used to determine what submenu to open. |
<li class="list-group-item {% if page.nav-tertiary %}tertiary-nav-item-pf{% endif %}" data-target="#amet-detracto-tertiary"> | ||
<a href="#0"> | ||
<a id="amet-detracto-menuitem" href="#0" role="menuitem" |
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.
@andresgalante Is there any chance to reconsider the href="#0"
? It breaks the browser back button among other problems.
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.
Yeap, will an empty herf
have tab index?
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.
I tested href=""
in the browser that PatternFly supports, and it does receive keyboard focus in all of them.
@LHinson we are waiting to do the JS part of this PR to merge it. Is there anyone able to do it? |
1b55948
to
f516ab4
Compare
Update css to apply hover styles on menu items with focus Update css to prevent keyboard Tab key from shiftin focus to hidden elements Update html test page example to include aria attributes for better screenreader support
f516ab4
to
48578bf
Compare
per @jgiardino:
So, we are going to close this PR and @jgiardino will create a new one after completing the above work + addressing #839 |
Description
Update css to apply hover styles on menu items with focus
Update css to prevent keyboard Tab key from shiftin focus to hidden elements
Update html test page example to include aria attributes for better screenreader support
Also includes additional text for screen readers for the following elements:
The following updates are needed but not included in this PR:
Jira stories:
https://patternfly.atlassian.net/browse/PTNFLY-2537
https://patternfly.atlassian.net/browse/PTNFLY-2611
Changes
Updates are mostly modeled after Adobe's accessible mega menu:
menu
are not added. After researching this, I based this decision on the following reasons:menu
role is not intended for navigation, as noted here: https://webaim.org/blog/three-things-voiceover/list
are being added. Even though this is redundant, there were a couple of issues I noticed that were resolved by including the default role to<ul>
and<li>
elements:aria-expanded
is applied to the element that controls the display of the submenu, but not to the submenu itself.aria-hidden
is applied to the submenu<span class="sr-only">(Active Menu Item)</span>
aria-label
is applied to the<ul>
of the submenuLink to rawgit and/or image
To be provided
PR checklist (if relevant)