Narrator is not reading role of Text Field, ComboBox, TagPicker
Bug Report
Requested priority: Medium
Describe the issue:
Narrator is not reading type of control of Text Field, Combo Box, Tag Picker
Actual behavior:
It's reading Label, editable or not but not type of control
Expected behavior:
screen reader should narrate the role as Text field
If applicable, please provide a codepen repro:
Not needed
@pandey11 can you link to the ARIA spec for the above request? Ideally from https://www.w3.org/TR/wai-aria-1.1/.
It will help us triage and provide a solution.
I noticed while testing Narrator + native inputs that the type of input is not announced, only that the element with focus is an "input".
Example: https://jsfiddle.net/Lz3op9se/
Narrator output:
fiddle.jshell.net, Hello world input, editing,
Hello world,
Hence why it will be good to see what the requirements are from the spec.
@KevinTCoughlin please refer below links for more details
https://www.w3.org/WAI/PF/GUI/roleTaxonomy-20060508.html https://www.w3.org/TR/UNDERSTANDING-WCAG20/ensure-compat-rsv.html
@pandey11, the components you mentioned above receive focus on their native <input /> element and have their roles set as follows:
-
TextField: hastype="text"and does not require a role as per W3 ARIA guidance since it is being used as an input for text i.e.The textbox role is used to identify an element that allows the input of free-form text. Whenever possible, rather than using this role, use an element with type="text", for single-line input, or a
-
ComboBox: hastype="text"and role="combobox" to denote it has custom combobox behaviors -
TagPicker: has notypeattribute, but has role="combobox" to denote it has custom combobox behaviors
My understanding is that roles are supplemental and often unnecessary if using semantic markup such as <input />, unless they have custom behavior such as our "combobox" scenarios.
From my investigation above, the actionable item I see at this point is to consider adding a type to TagPicker's input.
Otherwise the controls seem to the W3 ARIA spec to me. Narrator is reading that the element type is an "editable input"`. Also our roles are in-place for the custom behavior inputs and thus should be announced by assistive technology. If not then a bug should be filed against them.
Reference for role="combobox": https://www.w3.org/TR/wai-aria-1.1/#combobox
Note that the Fabric controls with role="combobox", TagPicker and ComboBox, announce their roles as they do in their W3 ARIA example counterpart in Edge + Narrator:
Fabric ComboBox announced in Edge + Narrator
Multi-select ComboBox (uncontrolled), Combo Edit,
Fabric TagPicker announced in Edge + Narrator
Tag Picker, Combo Edit,
Compare with W3 ARIA ComboBox example
Choice 2 Fruit or Vegetable, Combo Edit, collapsed,
Fabric TextField announced in Edge + Narrator
Text input announces the same as using a native <input />:
Standard, edit,
Compare with: https://jsfiddle.net/Lz3op9se/
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your contributions to Fabric React!