Last modified: 2014-06-09 18:32:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43297, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41297 - MediaWiki's assistive headers are broken in modern browsers
MediaWiki's assistive headers are broken in modern browsers
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: accessibility
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-23 08:27 UTC by Daniel Friesen
Modified: 2014-06-09 18:32 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Friesen 2012-10-23 08:27:11 UTC
In vector we output assistive headers into h5's to separate the parts of the UI for users using screen readers to understand.

However we use display: none; on these headers.
Modern screen readers use standard css-capable web browsers. This means that use of display: none; hides content from the very users who are supposed to be seeing them.

WAVE's text overview provides a good view of how this affects the output since they intentionally hide content that is display: none;ed to reflect the reality of screen readers:
http://wave.webaim.org/report?view=textonly&url=http://en.wikipedia.org/wiki/Ian_Fleming

As you can see our personal links, namespaces, and actions all just end up as a big mass of unlabeled lists that appear conceptually as part of the page text after categories.
Comment 1 Platonides 2012-10-23 08:30:27 UTC
That url is not really useful... "The file you uploaded is too big
Files uploaded to WAVE cannot be larger than 450 kilobytes."

Maybe we should use visibility: hidden instead?
Comment 2 Daniel Friesen 2012-10-23 08:41:29 UTC
(In reply to comment #1)
> That url is not really useful... "The file you uploaded is too big
> Files uploaded to WAVE cannot be larger than 450 kilobytes."

Looks like it's inconsistently working and not working.

Here's a smaller disambiguation page that'll also have less superfluous content in the way.

http://wave.webaim.org/report?view=textonly&url=http://en.wikipedia.org/wiki/Ian_Fleming_%28disambiguation%29

> Maybe we should use visibility: hidden instead?

visibility: hidden; is supposed to have the same effect on screen readers as display: none; does.

There are a few notable techniques for hiding things visually while leaving them in the page for screen readers.

{ position: absolute; left: -9000px; } /* Or some variant using -9999px, top: of the same value, and/or !important */

And:
{ overflow: hidden; height: 0; }

WordPress seems to like this technique:
{ position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px); }
Comment 3 Platonides 2012-12-30 21:59:10 UTC
The h5 were changed to h3, but still use display: none; However, the above wave link now shows the proper result.
Comment 4 Bartosz Dziewoński 2014-06-09 18:04:40 UTC
This has been mostly fixed with https://gerrit.wikimedia.org/r/#/c/112236/ and will be fixed entirely with https://gerrit.wikimedia.org/r/#/c/138368/.
Comment 5 Daniel Friesen 2014-06-09 18:13:39 UTC
This is NOT fixed. Those patchsets solve completely different problems.

The #p-search, #p-personal, #p-views, and #p-namespaces headers are still hidden using display: none;
Comment 6 Bartosz Dziewoński 2014-06-09 18:20:46 UTC
Oh huh, sorry. I've always thought they used ones of the accessible techniques, but that's apparently only used for #mw-navigation h2.
Comment 7 Daniel Friesen 2014-06-09 18:22:16 UTC
This bug is not about making headers visible, it's about using a screen-reader friendly method of hiding headers, because things like display: none; also hide them from screen readers that are supposed to be reading them out.
Comment 8 Daniel Friesen 2014-06-09 18:32:15 UTC
For an update on the techniques:

{ overflow: hidden; height: 0; }

This technique breaks in VoiceOver and should be avoided.


{ position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px); }

This one is the most reliable of them all, it works universally without side-effects.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links