Improve the inputs help
prop documentation
#63692
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] Components
/packages/components
[Status] In Progress
Tracking issues with work in progress
[Type] Developer Documentation
Documentation for developers
Description
Splitting this out from #61196 / #63669
Most (all?) of the input controls that extend the input base component accept a
help
prop. This prop is then used to automatically generate an element containg a description that is then associated via anaria-describedby
attribute to the input. So far so good.However, it appears the expected usage of this prop isn't that clear to contributors. For example, in the PostURL component the help prop is being passed an External link component that renders a full link with the additional text '(opens in a new tab)'. That's arguably a meaningful description for the input field to edit the post slug.
For example, that input field is exposed to assistive technologies this way:
Link
http://mydomain.org/my-awesome-and-long-post-slug/ (opens in a new tab)
I'm guessing this External link has been used as the
help
prop only for visual purposes, to place the link below the input. That's less than ideal.The
help
prop should be used for:As a developer, when hovering the
help
prop in my editor, I do get a popup with thehelp
prop documentation. Apparently, this isn't sufficient to help contributors fully understand the correct usage of this prop. Screenshot:I would like to propose to update this prop documentation and clearly explain it must be used only for meaningful descriptions or instructions.
See the base control:
Step-by-step reproduction instructions
N/A
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: