diff --git a/docs/docs/components/button-group.md b/docs/docs/components/button-group.md index f45f06691..73043ea6f 100644 --- a/docs/docs/components/button-group.md +++ b/docs/docs/components/button-group.md @@ -167,7 +167,7 @@ Create a split button using a button and a dropdown. Use a [visually hidden](/do Save - More options + Save diff --git a/docs/docs/components/visually-hidden.md b/docs/docs/components/visually-hidden.md deleted file mode 100644 index 4542c6b89..000000000 --- a/docs/docs/components/visually-hidden.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: Visually Hidden -description: The visually hidden utility makes content accessible to assistive devices without displaying it on the screen. -tags: component -noAlpha: true ---- - -According to [The A11Y Project](https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/), "there are real world situations where visually hiding content may be appropriate, while the content should remain available to assistive technologies, such as screen readers. For instance, hiding a search field's label as a common magnifying glass icon is used in its stead." - -Since visually hidden content can receive focus when tabbing, the element will become visible when something inside receives focus. This behavior is intentional, as sighted keyboard user won't be able to determine where the focus indicator is without it. - -```html {.example} -
- - Skip to main content - -
-``` - -## Examples - -### Links That Open in New Windows - -In this example, the link will open a new window. Screen readers will announce "opens in a new window" even though the text content isn't visible to sighted users. - -```html {.example} - - Visit External Page - - opens in a new window - -``` - -### Content Conveyed By Context - -Adding a label may seem redundant at times, but they're very helpful for unsighted users. Rather than omit them, you can provide context to unsighted users with visually hidden content that will be announced by assistive devices such as screen readers. - -```html {.example} - -
- Personal Info -
- - -
-``` diff --git a/docs/docs/experimental/themer.md b/docs/docs/experimental/themer.md index e1b415ebe..a334d7068 100644 --- a/docs/docs/experimental/themer.md +++ b/docs/docs/experimental/themer.md @@ -379,12 +379,8 @@ hasOutline: false background-color: var(--wa-color-neutral-fill-quiet); } - /** - , but without the :not(:focus-within), - the reason is that it shows the default browser file uploader. -*/ - .hidden-label::part(form-control-label), - .file-uploader input { + /** Visually hidden */ + .hidden-label::part(form-control-label) { position: absolute !important; width: 1px !important; height: 1px !important; @@ -522,7 +518,7 @@ hasOutline: false
-