Skip to content

Commit

Permalink
Change accessibilityRole for ExpandMenu "developer zone" to spinbutto…
Browse files Browse the repository at this point in the history
…n instead of button

React Native Paper does not handle AccessibiltyRole, so we have to just rename the accessibility text to include "spinbutton" to identify this object as a spinbutton. I am going with the expectation that accessibility elements in other languages (e.g. Spanish, Lao) use the same names for objects, such as "spinbutton", "button", etc. because this won't be translated
  • Loading branch information
sebastianbarry committed Jan 9, 2024
1 parent 8d8a40f commit dd1f404
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions www/js/control/ExpandMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const ExpansionSection = (props) => {
style={styles.section(colors.surface)}
title={t(props.sectionTitle)}
titleStyle={rowStyles.title}
accessible={true}
accessibilityLabel={t(props.sectionTitle) + ' spinbutton'}
expanded={expanded}
onPress={handlePress}>
{props.children}
Expand Down

0 comments on commit dd1f404

Please sign in to comment.