Skip to content

Commit

Permalink
Move styling to sr-only
Browse files Browse the repository at this point in the history
  • Loading branch information
nmanu1 committed Oct 27, 2021
1 parent 74b62d3 commit 2c9384b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion sample-app/src/components/InputDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default function InputDropdown({
}
{cssClasses.resultsCount &&
<span
className={cssClasses.resultsCount}
className={`${cssClasses.resultsCount} sr-only`}
aria-live='assertive'
ref={resultsCountRef}>
</span>
Expand Down
11 changes: 11 additions & 0 deletions sample-app/src/sass/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,14 @@
.result-description {
padding-left: 2em;
}

.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
border: 0;
}
11 changes: 0 additions & 11 deletions sample-app/src/sass/Autocomplete.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,4 @@
&__instructions {
display: none;
}

&__resultsCount {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
border: 0;
}
}

0 comments on commit 2c9384b

Please sign in to comment.