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

Navcurrent: Add aria-current="page" attribute #9307

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EricDunsworth
Copy link
Member

The navcurrent plugin is a perfect fit for the aria-current attribute. The former adds a class ("wb-navcurr") to visually-denote links to the current page, whereas the latter represents it in semantics.

Scenarios this covers:

  • Any links to the current page the plugin tries adding the "wb-navcurr" class to

Scenarios this won't cover:

  • Top-level mega menu links that point to dropdown IDs (aria-current is inappropriate in those scenarios)

The navcurrent plugin is a perfect fit for the aria-current attribute. The former adds a class ("wb-navcurr") to visually-denote links to the current page, whereas the latter represents it in semantics.

Scenarios this covers:
* Any links to the current page the plugin tries adding the "wb-navcurr" class to

Scenarios this won't cover:
* Top-level mega menu links that point to dropdown IDs (aria-current is inappropriate in those scenarios)
Copy link
Member

@duboisp duboisp left a comment

Choose a reason for hiding this comment

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

The [aria-current=page] is only when the link is visually styled to represent the currently-displayed page. This is not the case with your proposed change.

I tested your propose fix with the /index-en.html page and looked at the link in the footer. There is link where the attribute is added and they are not styled appropriately. For example the link: About the Web Experience Toolkit

ref. https://www.w3.org/TR/2021/CRD-wai-aria-1.2-20211208/#aria-current

@EricDunsworth
Copy link
Member Author

EricDunsworth commented Mar 16, 2022

I tested your propose fix with the /index-en.html page and looked at the link in the footer. There is link where the attribute is added and they are not styled appropriately. For example the link: About the Web Experience Toolkit

@duboisp IMO that's a CSS bug. #9308 will fix it in the WET theme (didn't add it to core since GCWeb currently doesn't use the navcurrent plugin at all).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants