Add a screen reader text option to RichText #57799
Labels
[Feature] Rich Text
Related to the Rich Text component that allows developers to render a contenteditable
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Status] Duplicate
Used to indicate that a current issue matches an existing one and can be closed
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
There is no easy way for users to add screen reader texts that they can edit in the editor but are visually hidden on the front.
WordPress uses a CSS class,
.screen-reader-text
to visually hide elements, but even if the user is aware of this feature, this class also hides the element in the editor.What is your proposed solution?
Add a screen reader text option to RichText.
Just like the RichText toolbar options can be used to wrap text within elements like
<strong>
and<em>
it could be used to wrap text inside a span with a CSS class that only hides the element on the front.The text was updated successfully, but these errors were encountered: