Page MenuHomePhabricator

Simplify and remove extraneous navigation landmark regions from modern Vector
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

Landmark regions are an important way people using assistive tech browse webpages. Currently most wiki pages easily have 10+ navigation regions depending on the page and wiki. These nav regions aren't always well labeled or easily understood (i.e. "Navigation navigation"), and having too many nav regions can make it harder for users to access other landmarks (i.e the main landmark region). Because landmarks are tied to Vector's implementation of Menu components, there are also examples of landmarks that contain a single element.

Suggested behavior

Many of these landmarks can be combined or removed. I suggest creating 3 new regions roughly corresponding to personal tools in the top right, the main site navigation links in the sidebar, and article links.

Developer notes

This can be accomplished by removing the nav element from the Menu mustache template. While we could easily swap out the nav element with a div, this means that we would lose labeling for the default and tab menus. This should be acceptable considering those menus will be enclosed by new nav landmark regions that presumably would have better labels.

Removing the nav element from the Menu temple also means we can remove the aria-hidden attribute from the label, which was previously used to reduce the verbosity of checkbox hack dropdown menus (the label was read out 3 times, once for the nav label, once for the checkbox button, and once for the label itself).

This change will likely involve cached HTML changes

Acceptance criteria / QA

  • Make sure click tracking continues to work on all menu items
  • Make sure navigation landmarks are reduced/replaced
  • Make sure menus/dropdown menus are still accessible and appropriately labeled for screen readers

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Jdlrobson triaged this task as Medium priority.Sep 20 2021, 5:51 PM

Yep seems like this is better done nearer the end of the project as part of our cleanup.

If I recall correctly much of our click tracking relies on nav selectors, so we'll need to make sure that we don't break the existing selector in WikimediaEvents.

Here's my proposal for the new landmark regions and their respective labels. @alexhollender_WMF Would you be able to take a look?

For more background, this task is basically changing the labels and groupings that screen reader users rely on when they navigate wikipedia. These have largely been unchanged since legacy, so I'd like a designer to approve the new copy/wording. This task also generally relates to the information architecture of desktop improvements, so I think it's also worth considering future changes to DI as well.

Current:

Landmarks in legacy Vector

Current landmarks (legacy).png (1×2 px, 1 MB)

Landmarks in modern Vector
Current landmarks (modern).png (1×2 px, 1 MB)

Proposed:

Landmarks in modern Vector

Proposed landmarks (modern).png (950×2 px, 947 KB)

Landmarks in future version of Vector
Proposed landmarks (future).png (811×2 px, 425 KB)

Note: The text in the screenshots is what's actually read out to screen reader users when they land on a landmark.

bwang updated the task description. (Show Details)

Change 783876 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] WIP Remove nav element from Vector menus, add new nav landmarks corresponding to user links, main site nav, and article editing tools

https://gerrit.wikimedia.org/r/783876

@bwang looks good to me. Curious what your thinking is around separating "article tools navigation" from "editing tools navigation"? I guess it would also make sense to me if those were one group.

Ah I just wasn't sure what was considered article tools, the links in the current main menu under "Tools" confused me a bit. Ok, if thats the case then I'll just combine them as "Article tools navigation"

bwang removed bwang as the assignee of this task.Apr 19 2022, 8:36 PM
bwang moved this task from Doing to Code Review on the Web-Team-Backlog (Kanbanana-FY-2021-22) board.

@bwang wait is there really one called "Navigation navigation"? 🤔

Yep it's this one under the logo in legacy

Screen Shot 2022-04-28 at 1.20.38 PM.png (608×394 px, 97 KB)
, or equivalently in the sidebar in modern. It's labeled as "Navigation", but every screen reader will read that out as "Navigation navigation" because labels aren't supposed to describe the semantics.

Change 783876 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Remove nav element from Vector menus and only render label elements in Vector menus when needed. Add new nav landmarks corresponding to user links, main site nav, and article editing tools. Split out legacy Menu template.

https://gerrit.wikimedia.org/r/783876

Where does the text "Article tools" come from? It's a message in the Vector skin for all MediaWiki installations, but "Article" is Wikipedia-specific terminology. It should be just "Tools" or maybe "Page tools".

Change 789548 had a related patch set uploaded (by Amire80; author: Amire80):

[mediawiki/skins/Vector@master] Change "Article tools" to "Tools".

https://gerrit.wikimedia.org/r/789548

Change 789548 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Change "Article tools" to "Tools"

https://gerrit.wikimedia.org/r/789548

I noticed an issue with the "Personal tools" navigation label not applying correctly, moving this to needs more work.

Change 790721 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Fix personal tools navigation landmark label

https://gerrit.wikimedia.org/r/790721

Change 790721 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Fix personal tools navigation landmark label

https://gerrit.wikimedia.org/r/790721

bwang moved this task from Code Review to QA on the Web-Team-Backlog (Kanbanana-FY-2021-22) board.
bwang added a subscriber: cjming.
bwang assigned this task to Jdrewniak.
bwang moved this task from QA to Code Review on the Web-Team-Backlog (Kanbanana-FY-2021-22) board.

@Jdrewniak all associated patches look merged. Can this be moved to QA?

@Jdlrobson, I need some more clarification on the first AC:

Make sure click tracking continues to work on all menu items

Based on some of the screenshots in T291304#7862224 I'm assuming this is for site navigation, editing tools navigation, and personal tools navigation. Let me know if this is correct? Secondly, I spent some time clicking on some of the site navigation links and was only able to see a couple of click events in the network tab. Is this where I'm supposed to be able to verify that clicks are tracked? Should every single menu item trigger an event if so?

Jan, can you help with this one?

Sorry for the delay on this one. I was able to verify that events continue to be sent by using the browser console. @Edtadros valid question. The web-ui-click-tracking events seem to be sent on page unload (just before you're sent to a new page), so I was able to see them by enabling "Preserve log" in the dev tools, and filter for "events". I was able to see events for the toolbar, the user menu, scrolling to top, and page init events.

Screen Shot 2022-06-13 at 10.04.30 AM.png (987×1 px, 693 KB)

cjming reassigned this task from cjming to bwang.

nice!

I realized that the team talked about this a month ago but that discussion was never reflected here. In short, the team decided to go with "Tools" navigation for all the tab links (i.e. article, talk, edit, history, etc) with the understanding this could be revisited in the future.

Looking at this again, I realized that "Tools" navigation is already an existing landmark for the article tools links in the main menu (i.e. Related changes, What links here, add interwiki links). It's probably confusing to reuse this landmark for the tabs. Considering we are planning to move many of the links in the main menu to the "Explore more" dropdown menu, my recommendation is to add an additional landmark like so: https://phabricator.wikimedia.org/F35317232. This would avoid the same label being used to describe a different set of links, and would provide an additional landmark to access all the links in the "Explore more" dropdown menu.

@Volker_E I also think landmarks will be important to test with Wikipedians. From an a11y guidance perspective, I think reducing the number of landmarks is more straightforward. However, we still need to strike a balance with maintain usability for experienced screenreader users. We can probably easily determine that printing links don't deserve their own landmark, but when it comes to other links like article tools, more testing or community feedback would really help inform those decisions.

@bwang Indeed. I'd be specifically careful with changes to learned behaviours of users of assistive technology. Every change is hard and in that case even harder.
Also I personally don't see more landmarks as necessary evil. It's just another pointer, if I'd be accommodated to it, I can ignore it, not having it is more hurtful. A good question to our contractor AFB.

@bwang Indeed. I'd be specifically careful with changes to learned behaviours of users of assistive technology. Every change is hard and in that case even harder.
Also I personally don't see more landmarks as necessary evil. It's just another pointer, if I'd be accommodated to it, I can ignore it, not having it is more hurtful. A good question to our contractor AFB.

Thats a good point. Although I think at least some landmarks have to be removed/changed with some of the upcoming DI changes like moving links from the main menu into the new "Explore more" dropdown in the page toolbar. I imagine it wont be very helpful to have multiple landmarks inside a dropdown which is closed most of the time

@Volker_E To err on the side of caution I filed T317440 to restore the original landmarks in the page toolbar (i.e. "views", "namespaces" and "more options"). The other landmarks in the main menu remain consolidated under "site navigation".

We can always revisit this topic and pick more sensible landmark names and groupings in the future, especially with the navigation restructure epic.