Skip to content

Components: Switch screen-reader-text to VisuallyHidden#18165

Merged
mkaz merged 3 commits intomasterfrom
fix/18127-screen-reader-text
Nov 4, 2019
Merged

Components: Switch screen-reader-text to VisuallyHidden#18165
mkaz merged 3 commits intomasterfrom
fix/18127-screen-reader-text

Conversation

@mkaz
Copy link
Copy Markdown
Member

@mkaz mkaz commented Oct 29, 2019

Description

This is the follow up PR from comment in #18127 it addresses changing the other spots in components that use screen-reader-text to using VisuallyHidden component.

The two spots changed are: base-control and form-text-token

How has this been tested?

I created a story in Storybook to be committed in separate PR and confirmed that using the component shows the label as intended,

Types of changes

In essence it changes <span className="screen-reader-text"> ... </span> to
<VisuallyHidden> ... </VisuallyHidden>

The base-control change uses label, and had a bit more logic wrapped around it.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants