-
Notifications
You must be signed in to change notification settings - Fork 256
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
New ARIA technique for the aria-current attribute #1707
base: main
Are you sure you want to change the base?
Conversation
View Technique Using aria-current to identify the current item in a set |
Looks good. The only thing I wondered about is if the current (recursive) link should actually link to the current page or better get rid of the |
I go back and forth on removing the |
@fstrr There is the visual aspect as well, the link with aria-current will likely still appear active (underline, other focus indication) even though is does nothing but reload the page (and some people say that can be a useful thing). I can certainly live with both options, I just wanted views on what would be the preferable implementation (as Techniques will be seen as best practice). |
It can also be a main menu and the current page was located under the same main menu item, but is not identical to the page accessed via the menu item in the main menu. That's why I think href makes sense |
The problem with removing the But I think at least JAWS treats a link with aria-current on it as disabled, so it conveys the correct semantic intent, right? |
In HTML a link cannot be disabled (the attribute is not allowed). aria-disabled is allowed on links. Disabled and aria-current are different things and are also output differently by screen readers. But a link with aria-current is not automatically disabled (because e.g. with this link the current page can be reloaded), so the different output is correct. |
@JAWS-test sorry, I should have been clearer - I didn't mean that I meant that in some ways what developers mean when they remove the I agree that I guess I should ask the question - how do JAWS (and other screen readers) announce each of these:
|
With JAWS and NVDA, "current page" is correctly output as the status in all three examples (because aria-current is a global attribute according to the ARIA specification and may be used with any role). The only difference between example 1 and 2+3 is that in example 1 a link is output and in 2+3 only text is output. Only example 1 is reached via quick navigation for links and is displayed in the link overview. Only example 1 gets focus with tab key |
This PR is in relation to issue #1681