Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reader Document Viewer: Page loses visual indication of focus after tabbing through Search cases #12245

Closed
alisan16 opened this issue Sep 27, 2019 · 2 comments · Fixed by #14532
Assignees
Labels
Product: caseflow-reader Team: Echo 🐬 Type: Accessibility Related to Accessibility support (Section 508)

Comments

@alisan16
Copy link
Contributor

When a document is selected to be displayed in the reader, there is no visual indication of focus after the Search Text element. (New: 08/27/2019) I used my tool to show the focus in yellow below however you cannot visually see this focus without the tool on. This loss of focus happens for seven tab stops.

Screen Shot 2019-09-27 at 5 18 59 PM

@alisan16 alisan16 added the Type: Accessibility Related to Accessibility support (Section 508) label Dec 4, 2019
@chandracarney chandracarney changed the title Reader Document Viewer: Document Viewer: Page loses visual indication of focus after tabbing through Search cases Reader Document Viewer: Page loses visual indication of focus after tabbing through Search cases May 26, 2020
@ajspotts
Copy link
Contributor

what is this chart?

1 | 
2 | |||
3 | |||||||||
5 | 
8 | 

Why 1?

Why 2?

  • Optimism?
  • This sounds straightforward once we get our bearings
  • Looks like there are a few unseen elements that are being selected.

Why 3?

  • General lack of knowledge around how active elements are determined and displayed

@yoomlam
Copy link
Contributor

yoomlam commented Jun 15, 2020

The initially hidden search bar cf-search-bar constitutes 4 tab stops:
image

The cf-pdf-scroll-view requires 2 to 3 tab stops (one for each ReactVirtualized__Grid, which shows the previous, current, and next document):
image

Parent elements have tabindex="-1" but that doesn't affect child elements -- see https://stackoverflow.com/questions/42761987/tabindex-1-not-working-for-child-elements.

  • So display: none on cf-search-bar works!
  • Adding display: none on ReactVirtualized__Grids will hide the pdf, so let's use tabindex="-1" instead.

FYI:

The currently focused element can be found with document.activeElement.

https://hacks.mozilla.org/2019/06/indicating-focus-to-improve-accessibility/

@yoomlam yoomlam self-assigned this Jun 16, 2020
va-bot pushed a commit that referenced this issue Jun 16, 2020
Resolves #12245

### Description
Remove extra tab stops:
1. for search bar when it is hidden and
2. for the PDF view, i.e.,`ReactVirtualized__Grid` elements (`Grid` React components within `PdfFile`)

See #12245 (comment)

### Acceptance Criteria
- [x] Code compiles correctly
- [ ] Tab stops flow from search icon to the PDF to the bottom of PDF viewer when search bar is hidden
- [ ] Tab stops flow from search icon to search bar elements when search bar is visible
- [ ] Reader's keyboard shortcuts still work

### Testing Plan
1. Log in as attorney
2. Go to their queue and click one of the "View docs" links for an appeal
3. Use keyboard to tab to the search (magnifying glass) icon. Continue to press Tab to see the next selection/focus.
   * Try clicking on the search icon to open the search panel; then pressing Tab.
   * Try Shift-Tab to go backwards.

All Tab keyboard navigation should move the current focus to a reasonable element.

### User Facing Changes

The current focused element should always be visible with a dotted outline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product: caseflow-reader Team: Echo 🐬 Type: Accessibility Related to Accessibility support (Section 508)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants