Skip to content

Commit

Permalink
Merge pull request #468 from github/kendallgassner-patch-1
Browse files Browse the repository at this point in the history
Update a11y-no-visually-hidden-interactive-element.md
  • Loading branch information
kendallgassner committed Jul 21, 2023
2 parents cd17c09 + 6e469d2 commit 2a6777e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions docs/rules/a11y-no-visually-hidden-interactive-element.md
Expand Up @@ -12,7 +12,7 @@ Note: we are not guarding against visually hidden `input` elements at this time.

### Why do we visually hide content?

Visually hiding content can be useful when you want to provide information specifically to screen reader users or other assitive technology users while keeping content hidden from sighted users.
Visually hiding content can be useful when you want to provide information specifically to screen reader users or other assistive technology users while keeping content hidden from sighted users.

Applying the following css will visually hide content while still making it accessible to screen reader users.

Expand Down Expand Up @@ -61,16 +61,14 @@ width: 1px;

- className - A css className that visually hides content. Defaults to `sr-only`.
- componentName - A react component name that visually hides content. Defaults to `VisuallyHidden`.
- htmlPropName - A prop name used to replace the semantic element that is rendered. Defaults to `as`.

```json
{
"a11y-no-visually-hidden-interactive-element": [
"error",
{
"className": "visually-hidden",
"componentName": "VisuallyHidden",
"htmlPropName": "as"
"componentName": "VisuallyHidden"
}
]
}
Expand Down
1 change: 0 additions & 1 deletion lib/rules/a11y-no-visually-hidden-interactive-element.js
Expand Up @@ -8,7 +8,6 @@ const defaultcomponentName = 'VisuallyHidden'
const schema = generateObjSchema({
className: {type: 'string'},
componentName: {type: 'string'},
htmlPropName: {type: 'string'},
})

/** Note: we are not including input elements at this time
Expand Down

0 comments on commit 2a6777e

Please sign in to comment.