Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: support accessibility ARIA props #1473

Closed
7 tasks done
mdjastrzebski opened this issue Aug 28, 2023 · 1 comment
Closed
7 tasks done

Feature: support accessibility ARIA props #1473

mdjastrzebski opened this issue Aug 28, 2023 · 1 comment

Comments

@mdjastrzebski
Copy link
Member

mdjastrzebski commented Aug 28, 2023

Summary

The new aria-* props are being rendered to mocked View, Text, TextInput components directly without translation to original accessibilityState prop. Therefore, we need to modify related checks to account for these.

Scope:

Evidence

test('React Native API assumption: aria-* props render on host View', () => {
  const view = render(
    <View
      testID="test"
      aria-busy
      aria-checked
      aria-disabled
      aria-expanded
      aria-hidden
      aria-label="Label"
      aria-labelledby="LabelledBy"
      aria-live="polite"
      aria-modal
      aria-pressed
      aria-readonly
      aria-required
      aria-selected
      aria-valuemax={10}
      aria-valuemin={0}
      aria-valuenow={5}
      aria-valuetext="ValueText"
    />
  );

  expect(view.toJSON()).toMatchInlineSnapshot(`
    <View
      aria-busy={true}
      aria-checked={true}
      aria-disabled={true}
      aria-expanded={true}
      aria-hidden={true}
      aria-label="Label"
      aria-labelledby="LabelledBy"
      aria-live="polite"
      aria-modal={true}
      aria-pressed={true}
      aria-readonly={true}
      aria-required={true}
      aria-selected={true}
      aria-valuemax={10}
      aria-valuemin={0}
      aria-valuenow={5}
      aria-valuetext="ValueText"
      testID="test"
    />
  `);
});

References

Test plan

Add relevant test cases.

@mdjastrzebski mdjastrzebski changed the title support accessibility aria-* state props [WIP] support accessibility aria-* state props Aug 29, 2023
@mdjastrzebski mdjastrzebski changed the title support accessibility aria-* state props Feature: support accessibility ARIA props Aug 31, 2023
@mdjastrzebski
Copy link
Member Author

Resolved in numerous PR mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant