diff --git a/docs/a11y-support.md b/docs/a11y-support.md new file mode 100644 index 0000000..d445716 --- /dev/null +++ b/docs/a11y-support.md @@ -0,0 +1,27 @@ +# A11y Support + +## Tested devices +* Google Chrome + ChromeVox +* Windows + Firefox + NVDA +* Windows + Firefox + JAWS + +## What to expect + +### Navigation +Tab and Shift + Tab are supported when navigating between tokens, it can't be +used to navigate menus. +Navigation inside the menus is entirely done with the arrow keys. + +### Speech pattern +A Token should be spoken in its entirety adding a menu notification when the +dropdown menu is available (expanded and compressed) + +The input itself should notify when the suggestions dropdown is available. + +Inside the suggestions dropdown there are a number of lists with options. +The desired behaviour is that when focusing an option it is read out with its +position in the list and the name of the current list. + +Inside the dropdown menu the behaviour is similar, it should read the name of +the option with the indication of the checked status of the menu item. The +status is *true* if it's the currently selected facet, it's *false* otherwhise. diff --git a/package.json b/package.json index afc5956..68c8e3d 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "express": "^4.13.3", "jest-cli": "^0.8.2", "react": "^0.14.5", + "react-a11y": "^0.3.1", "react-addons-test-utils": "^0.14.7", "react-dom": "^0.14.5", "rimraf": "^2.5.0", diff --git a/src/DropdownMenu.js b/src/DropdownMenu.js index 5cb0df8..8649d70 100644 --- a/src/DropdownMenu.js +++ b/src/DropdownMenu.js @@ -1,6 +1,8 @@ import React from 'react'; -const DropdownMenuSeparator = () =>
; +import { UNIQUE_ID } from './FacetedTokenInput'; + +const DropdownMenuSeparator = () => ; const DropdownMenuItem = ({ selected, @@ -8,10 +10,18 @@ const DropdownMenuItem = ({ sectionIndex, index, addToken, - setSelected + setSelected, + sectionTitle }) => ( -
  • +
  • addToken(suggestion.result) } onMouseMove={ () => setSelected({ sectionIndex, index }) } @@ -22,9 +32,21 @@ const DropdownMenuItem = ({ ); const DropdownMenuSection = ({ section, sectionIndex, ...props }) => ( -