Skip to content

Commit

Permalink
Describe dropdown-opening button
Browse files Browse the repository at this point in the history
For now, the button that opens dropdowns uses the "button" accessibility role
this does not properly describe what clicking the button will do to screen
reader users.
  • Loading branch information
personalizedrefrigerator committed Nov 8, 2024
1 parent 35df001 commit 2a5d1cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/app-mobile/components/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,16 @@ class Dropdown extends Component<DropdownProps, DropdownState> {
disabled={this.props.disabled}
onPress={this.onOpenList}
accessibilityRole='button'
accessibilityHint={this.props.accessibilityHint}
accessibilityHint={[this.props.accessibilityHint, _('Opens dropdown')].join(' ')}
>
<Text ellipsizeMode="tail" numberOfLines={1} style={headerStyle}>
{headerLabel}
</Text>
<Text
style={headerArrowStyle}
aria-hidden={true}
importantForAccessibility='no'
accessibilityElementsHidden={true}
accessibilityRole='image'
>{'▼'}</Text>
</TouchableOpacity>
Expand Down

0 comments on commit 2a5d1cb

Please sign in to comment.