Skip to content

Conversation

@agniuks
Copy link
Contributor

@agniuks agniuks commented Apr 21, 2022

Description

This PR adds UIA events when accessibilityState has changed which will ensure that accessibility clients like Narrator can announce these types of changes to the user.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Why

Resolves: #8491

What

Added peer.RaisePropertyChangedEvent() calls when selected, disabled, checked, or expanded state has changed.

Screenshots

Here's an example that togggles Expand/Collapse state, highlighted portion is what Narrator announces when the touchable is clicked.

<TouchableHighlight
          style={styles.item}
          accessibilityLabel="Group Expand Collapse Button"
          accessible={true}
          accessibilityRole="none"
          accessibilityState={{expanded: this.state.displayText}}
          onPress={() => {
            this.setState({displayText: !this.state.displayText});
          }}>
     <Text style={styles.text}>Group Expand/Collapse</Text>
</TouchableHighlight>

image

Testing

Tested through Narrator that changes to each of the accessibility states (selected, disabled, checked, or expanded) are announced when the appropriate accessibilityRole is set.

Microsoft Reviewers: Open in CodeFlow

@agniuks agniuks requested review from a team as code owners April 21, 2022 17:25
@ghost ghost added the Area: Accessibility label Apr 21, 2022
Copy link
Contributor

@chiaramooney chiaramooney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changes to AccessibilityState fail to cause Narrator to read out the new state

3 participants