Vector 2022 should drop support for checkbox hack (IE11) for better accessibility and to fix issues with hover states on language button
Open, MediumPublic

Description

Background

The checkbox hack is used in places where an interactive dropdown is needed but we don't want to require JavaScript, notably for header navigation tools in Vector and MinervaNeue and the language button in Vector 2022. Here's an example from Vector:

Screenshot 2023-03-28 at 3.01.18 PM.png (792×1 px, 306 KB)

This is not fully compatible with Codex, and is most noticeable when you long press the language button resulting in accessible text.

The details element provides a more modern alternative: https://caniuse.com/?search=details

In short, at the moment accessibility of the site is coming at the cost of support for a small amount of users using outdated browsers.

User story

As a user of a modern browser (and majority of Wikimedia's audience) I want the best accessibility for all the ways I interact with the site.

Requirements

  • The details element should be used instead of the checkbox hack
  • Vector should not use checkbox hack

Per our commitment to grade C browsers, it is important that the user can login and view an article. With this in mind:

  • For IE11 and browsers that do not support the details element the table of contents should not be available (hidden)
  • For IE11 and browsers that do not support the details element, the page tools menu will not be available (hidden)

Design

If details/summary is used without consideration of IE11 this would be the outcome for IE11:

Screenshot 2024-04-25 at 4.52.52 PM.png (639×1 px, 365 KB)

To avoid this we should hide these menus given the requirements like so:

Screenshot 2024-04-25 at 5.02.11 PM.png (1×3 px, 1 MB)

Historic information

This information is provided for context, but should not be considered while implementing the ticket.

The <label> element is styled to look like a button, and styles based on states like hover, focus, and active are achieved by using a selector based on the sibling <input> element's state. See these styles in the medawiki.ui button.

Currently, there is no way to effectively apply Codex button styles to a label in this way.

Implementation ideas
  • As a first step, we could add selectors like the ones from mediawiki.ui linked above. This way, the CSS-only Button classes could be added to the <label> element and all necessary styles would apply, including for the different states
  • In the future, we may want to consider a ButtonMenu component whose CSS-only version is the checkbox hack

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

@CCiufo-WMF revisiting this, I did originally set the acceptance criteria to just cover making this possible, not actually providing full support within Codex itself. So resolving T284273 will resolve this task too, although we may want to consider if we do want to provide documented, full support for the checkbox hack in Codex in the future.

Thanks @AnneT! Yeah let's keep this ticket as written and hold off on the "full support" until there is a clear need.

Change 922910 had a related patch set uploaded (by Anne Tomasevich; author: Bernard Wang):

[design/codex@main] Button: Add classes to support CSS-only non-button buttons

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

Change 922910 merged by jenkins-bot:

[design/codex@main] Button: Add classes to support CSS-only non-button buttons

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

Change 927786 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/core@master] Update Codex from v0.11.0 to v0.12.0

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

Test wiki created on Patch demo by ATomasevich (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/8ca78d2715/w

Change 927786 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v0.11.0 to v0.12.0

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

Test wiki on Patch demo by ATomasevich (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/8ca78d2715/w/

Jdlrobson subscribed.

This is high from web team's side. I've added it to agenda on next web/dst sync.

This is high from web team's side. I've added it to agenda on next web/dst sync.

The next scheduled sync is Jan 29 -- is that ok, or is it high enough to discuss sooner?

I think that's fine, but it would be good if DST could chat about it beforehand? Maybe it's something we can resolve asynchronously?

CCiufo-WMF claimed this task.
CCiufo-WMF moved this task from Backlog to Up Next on the Design-System-Team board.

Yes we can discuss it ahead of time.

oops, too many actions at once.

Do we really want to keep using/recommending this pattern in Codex? We were talking last week about starting to use the new <details> element more widely (and possibly adjusting our browser support requirements for basic support).

I would love to be able to leave such hacks behind in favor of clean, declarative, modern web standards.

CCiufo-WMF renamed this task from Button: Support the "checkbox hack" to Button: Consider supporting the "checkbox hack".Jan 22 2024, 6:34 PM

Change 997594 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] POC: Express dropdowns as details/summary elements

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

It's a good question. It looks like this would be straightforward so it would be a product call - these menus are important and we'd need to think carefully about how they degrade in older browsers (it might be better to make them disappear rather than to make them always show for example).

Support looks pretty good based on who we tend to build for: https://caniuse.com/?search=details

CCiufo-WMF changed the task status from Open to Stalled.Mar 7 2024, 8:40 PM

This is stalled pending dropping IE 11 from Basic Support

Test wiki created on Patch demo by Jdlrobson using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/a50d75d75f/w

Jdlrobson renamed this task from Button: Consider supporting the "checkbox hack" to Vector 2022 should drop support for checkbox hack (IE11) for better accessibility.Apr 26 2024, 12:02 AM
Jdlrobson updated the task description. (Show Details)
CCiufo-WMF changed the task status from Stalled to Open.May 24 2024, 2:50 PM

On wikitech-l we just announced the dropping of dedicated support for IE11 (https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/B52WYXP7JBCVYOS7WRNSJNSOHUZYOAJH/). Is this still stalled?

Even though there are a few more things to finish off in T288287: Remove IE11 from Basic support ("Grade C"), I'd say this is effectively unblocked.

Jdlrobson moved this task from Incoming to Groomed on the Web-Team-Backlog board.

This is mostly ready to go, but we will need to think carefully about whether we care about the broken experience for older browsers before we work on this, and how the experience should degrade. Currently it degrades to:

Screenshot 2024-04-25 at 4.52.52 PM.png (639×1 px, 365 KB)

Possible options are:

  • This is acceptable
  • Show a banner asking the user to upgrade their browser.
  • Hide menus

This is mostly ready to go, but we will need to think carefully about whether we care about the broken experience for older browsers before we work on this, and how the experience should degrade. Currently it degrades to:

Screenshot 2024-04-25 at 4.52.52 PM.png (639×1 px, 365 KB)

Possible options are:

  • This is acceptable
  • Show a banner asking the user to upgrade their browser.
  • Hide menus

@Jdlrobson Can you enable permissions on

Screenshot 2024-04-25 at 4.52.52 PM.png (639×1 px, 365 KB)
? I can't see the screenshot to determine whether or not the old browser experience is too broken.

Done!

Thanks.

Per @AnneT 's initial recommendation, let's have this degrade by hiding the menus. That is much cleaner and more usable.

Screenshot 2024-04-25 at 5.02.11 PM.png (1×3 px, 1 MB)

Depending on the likelihood of IE11 readers are looking for things that are hidden, we may also want to include a notice to the effect of...

Some features may not work as expected because you are using a browser that is no longer supported. Please use a supported browser.

We can add the notice as a follow-up ticket if that usecase arises.

Thanks this looks ready for estimation now! Perhaps as part of sprint 6?

Jdlrobson lowered the priority of this task from High to Medium.Jun 13 2024, 1:22 AM
Jdlrobson renamed this task from Vector 2022 should drop support for checkbox hack (IE11) for better accessibility to Vector 2022 should drop support for checkbox hack (IE11) for better accessibility and to fix issues with hover states on language button.Jun 20 2024, 5:44 PM
Jdlrobson added a subscriber: Diskdance.
NOTE: At time of writing, I seem to be running into https://issues.chromium.org/issues/41152783 when testing the patch for this fix which is a little worrying in Chrome. * Click hide on table of contents * Click tables of contents icon. See: awww snap
NOTE: At time of writing, I seem to be running into https://issues.chromium.org/issues/41152783 when testing the patch for this fix which is a little worrying in Chrome. * Click hide on table of contents * Click tables of contents icon. See: awww snap

I can reproduce the same Chromium issue with the crash on the Citizen skin, which has already replaced most of the checkbox hacks with <details> and <summary>. I am not sure if it is directly caused by the said issue, but it does trigger occasionally.

This will be a complex change and given the bug above we need more time to think about it. Postponing to post-dark mode deploy.