fix: Miscellaneous improvements for screenreader support.#9424
fix: Miscellaneous improvements for screenreader support.#9424gonfunko merged 4 commits intoadd-screen-reader-support-experimentalfrom
Conversation
I presume this means that it is expected that custom fields need to add their own aria attributes as appropriate? If so, is there a default / fallback that can be used? |
Yes, custom fields should set attributes as appropriate, but assuming they inherit from e.g. |
rachel-fenichel
left a comment
There was a problem hiding this comment.
Changes look good, and I'm glad label calculation is now being done lazily.
Please put a comment on this PR describing what tests you think should be added to validate these changes. (Or link to an issue with that information.)
|
Things that would be nice to test, assuming we keep all this:
|
4f475c7
into
add-screen-reader-support-experimental
The basics
The details
Resolves
Proposed Changes
This PR is a grab bag of improvements to the screenreader experience. Specifically:
role="button", since they must be activated before they can be edited, which the oldrole="textbox"did not make clear.FieldDropdown.recomputeAria()has been madeprotected, which unblocks fixingFieldColour's readout.ariaNamemay (and should) be included in the field's config to specify a useful name/context.