Skip to content

Commit

Permalink
Update naming
Browse files Browse the repository at this point in the history
  • Loading branch information
nmanu1 committed Oct 29, 2021
1 parent ab97030 commit 7ecf337
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions sample-app/src/components/InputDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ export default function InputDropdown({
instructionsId={screenReaderInstructionsId}
instructions={screenReaderInstructions}
shouldCount={shouldAutocompleteCount}
countKey={countKey}
countText={countKey ?
announcementKey={countKey}
announcementText={countKey ?
processTranslation({
phrase: `${options.length} autocomplete option found.`,
pluralForm: `${options.length} autocomplete options found.`,
Expand Down
14 changes: 7 additions & 7 deletions sample-app/src/components/ScreenReader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ interface Props {
instructionsId?: string,
instructions?: string,
shouldCount: boolean,
countKey?: number,
countText?: string
announcementKey?: number,
announcementText?: string
}

export default function ScreenReader({
instructionsId,
instructions,
shouldCount,
countKey,
countText,
announcementKey,
announcementText,
}: Props): JSX.Element | null {

return (
Expand All @@ -28,11 +28,11 @@ export default function ScreenReader({
}
{shouldCount &&
<div
className='ScreenReader__count'
key={countKey}
className='ScreenReader__announcementText'
key={announcementKey}
aria-live='assertive'
>
{countText}
{announcementText}
</div>
}
</>
Expand Down
2 changes: 1 addition & 1 deletion sample-app/src/sass/ScreenReader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
display: none;
}

&__count {
&__announcementText {
position: absolute;
width: 1px;
height: 1px;
Expand Down

0 comments on commit 7ecf337

Please sign in to comment.