Page MenuHomePhabricator

Add aural "+" and "-" hints to unified diffs for users who use screenreaders
ClosedPublic

Authored by epriestley on Oct 20 2017, 5:45 PM.
Tags
None
Referenced Files
F13089871: D18718.diff
Thu, Apr 25, 2:03 AM
Unknown Object (File)
Fri, Apr 19, 6:54 PM
Unknown Object (File)
Sat, Apr 6, 10:29 AM
Unknown Object (File)
Feb 14 2024, 4:42 AM
Unknown Object (File)
Jan 16 2024, 1:54 AM
Unknown Object (File)
Jan 9 2024, 10:11 AM
Unknown Object (File)
Dec 26 2023, 7:50 AM
Unknown Object (File)
Nov 30 2023, 4:59 AM
Subscribers
None

Details

Summary

See PHI160 for discussion.

Test Plan

With ?__aural__=1, saw aural hints:

Screen Shot 2017-10-20 at 10.41.22 AM.png (798×503 px, 110 KB)

Without, saw normal visual diff.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley created this revision.

Is it possible for this to cause unexpected line wraps by overflowing the diff pane?

This revision is now accepted and ready to land.Oct 20 2017, 6:00 PM

In ?__aural__=true mode all kind of crazy layout stuff can happen, but it's just for debugging.

In normal mode, we slap a bunch of CSS classes on this content which prevents it from affecting layout in any known browser or rendering scenario:

.aural-only {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);

  /* NOTE: Without this, Safari sometimes lays these elements out at normal
     size. An example is the label on the comment action menu on timelines. */

  width: 0;
  height: 0;
  overflow: hidden;
}

This is consistent with recommendations from, e.g., WebAIM and generally standard practice.

It's possible that this ruleset isn't exhaustive and may require tuning at some point, but I don't anticipate any side effects in this case since I think it's a pretty standard one. We already make fairly regular use of aural-only and visual-only content without issues (you can access any page with ?__aural__=1 in the URL to have aural-only content shown in blue and visual-only content muted in transparent pink).

This revision was automatically updated to reflect the committed changes.