Repository navigation
suppress focus outlines for console output regions - #7570
Merged
Merged
Conversation
adamconroy
approved these changes
Aug 11, 2020
adamconroy
left a comment
Contributor
There was a problem hiding this comment.
What a funny/messy/annoying bug!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
When selecting text from the Console output region, keyboard focus rectangles were being shown if you pressed a key (e.g. using Shift to extend the selection; these could be quite ugly and don't serve any real purpose, so this change gets rid of them.
It gets much uglier if you turn off the (relatively new) accessibility option "Always show focus outlines". Then just clicking on it was enough to trigger focus outlines.
Approach
Use CSS to suppress focus rectangles. Sometimes focus was being placed on the
divthat wraps the entire output region, sometimes it was being placed on the individual spans used to wrap each output "chunk" so the css needed to handle both.QA Notes
Generate some console output, then click on it, then tap Shift key (or any key). Previously you'd see something like this:
It was much worse if you had the "Always show focus outlines" option unchecked.
With the fix those focus outlines should no longer display whether or not the "Always show focus outlines" option is enabled.
Other Notes
This focus-rectangle suppression is itself a minor accessibility issue, but the main scenario for putting focus on the console output via keyboard is for screen reader users via the "Focus Console Output" command, in which case focus-rectangles are not necessary since the screen reader will announce that focus is in the console output.
If we ever support selection of console output via keyboard-only, then we'll have to revisit this. #6077