Skip to content

Commit

Permalink
Add visually hidden components count live region
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Samec committed Feb 11, 2025
1 parent 05a5717 commit 346ce60
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ import { BehaviorSelection } from './BehaviorSelection';
import { MatchingComponents } from './MatchingComponents';

const useStyles = makeStyles({
visuallyHidden: {
clip: 'rect(0px, 0px, 0px, 0px)',
height: '1px',
width: '1px',
margin: '-1px',
padding: '0px',
overflow: 'hidden',
position: 'absolute',
},
secondLevel: { 'margin-left': '30px' },
thirdLevel: { 'margin-left': '60px' },
forthLevel: { 'margin-left': '90px' },
Expand Down Expand Up @@ -372,10 +381,9 @@ export const Selector = () => {
</div>
{mode === 'byComponents' && (
<>
{/* // TODO make aria-live region which is hidden and announce the number of components available */}
{/* <div>
<div className={classes.visuallyHidden}>
<Text role="status">{filteredComponentsDefinitions.length} components available.</Text>
</div> */}
</div>
<h2>Choose Component ({filteredComponentsDefinitions.length})</h2>
{selectedComponents.length > 0 && (
<>
Expand Down

0 comments on commit 346ce60

Please sign in to comment.