Page MenuHomePhabricator

Navigation portlets should expose current page with [aria-current] property
Open, LowPublicFeature

Description

Feature summary (what you would like to be able to do and where):
aria-current is an ARIA property that denotes that a link links to the current page. While sighted users can easily get this info from observing the page, screen reader users can benefit from this information being exposed on links in the navigation so they would not, for example, go to the same page twice without knowing it.

[aria-current="page"] on the link that corresponds to the current document would provide assistance to screen reader users and a potential skinning choice for skin authors that are interested in highlighting the current document link in some way or another with CSS.

Tests with screen readers need to be made on whether aria-current="page" gets translated into other languages appropriately (so it does not say Aktuelle Page in German NVDA, for example). If it does not get translated, something like aria-current="true" is also better than nothing.

Event Timeline

Which skin does this bug relate to?

If all skins what markup are you suggesting we add to the page and where?

Which skin does this bug relate to?

All skins.

If all skins what markup are you suggesting we add to the page and where?

Not sure I understand the question. Navigation portlet links should expose aria-current="page" when are located on the page in question, similarly to how class="selected" is done in (all?) skins on page tabs that correlate to current location.

I think my issue might be with the teminology "portlet". What is a navigation portlet link look like in the mobile skin Minerva, for example? Are we talking about any link inside a menu or just the link to the current page that's next to talk tab?

e.g. are we talking about these links?

Screen Shot 2022-05-19 at 1.10.13 PM.png (968×292 px, 48 KB)

Screen Shot 2022-05-19 at 1.10.30 PM.png (456×328 px, 21 KB)

Perhaps there is overlap with this ticket and this one: https://phabricator.wikimedia.org/T20465 if the goal is accessibility? I think the only place the link should be to the current page is the tab next to talk page?

Minerva does not have navigation portlets per se because it implements its own sidebar, though I think even its mobile menu can benefit from this change. T20465: Tabs in Monobook and Vector should indicate selected state for assistive technology is similar to this, yes, but I am not talking strictly about tabs. As for ‘the only place the link should be to the current page is the tab next to talk page’, it is not strictly true: sidebar links can lead to the same page that we are on, and this should be indicated to screen reader users.

As for ‘the only place the link should be to the current page is the tab next to talk page’, it is not strictly true: sidebar links can lead to the same page that we are on, and this should be indicated to screen reader users.

Could you give me some examples? That would be helpful in helping prioritize this work.

Well, the basic example is that the sidebar link to ‘Main Page’ leads to the same page you are on if you are located on the project’s main page.