-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core 422 419 answer choice accessibility (#78)
* Use radio buttons for answer choices - Use radio buttons instead of push buttons for answer choices. Many screen readers have shortcuts to cycle between controls of a type. For example, some will cycle between radio buttons with (r) and push buttons with (b). Radio buttons also allow changing answer choices via the cursor keys without focus leaving the radio group. This also outsources quite a few accessibility requirements to the browser. - Add focus outline to custom radio buttons For accessibility, focusable elements should have a visually distinct outline when focused. - Obscure radio buttons in a way that works with screen readers. `display: none` causes screen readers to ignore the element. - Use `aria-details` to tie the feedback html to the answer. `aria-details` is preferred over `aria-describedby` when the associated element may contain something other than plain text. - Add role=radiogroup to answers-table. Many screen readers have shortcuts to cycle between radio groups. Screen readers also read the label of the radio group when it gains focus. - Set width/height of answer-input-box to 1px In react-aria-components, radio buttons are placed inside 1x1 spans with overflow hidden. This change is an attempt to copy that without nesting the radio button inside of a span. * Remove duplicated correctness indicator from label AnswerIndicator adds correctness to the label. * Update snapshots * Create and use visuallyHidden mixin for answer-input-box * Use html variable to determine if there is feedback * Refactor Answer component Split it into discrete components * Update snapshots className changes are from the new `visuallyHidden` mixin
- Loading branch information
1 parent
f332eea
commit 86c1455
Showing
11 changed files
with
618 additions
and
848 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.