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

Extend accessibilityLabel support to aria-label prop alias #724

Open
leggomuhgreggo opened this issue Sep 18, 2024 · 1 comment
Open

Extend accessibilityLabel support to aria-label prop alias #724

leggomuhgreggo opened this issue Sep 18, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@leggomuhgreggo
Copy link

leggomuhgreggo commented Sep 18, 2024

Feature description

The idea would be to use aria-label the way accessibilityLabel is for interaction tracking

Background

React Native 0.71.3 added support for "web inspired" prop aliases [docs]

This release includes a number of new props inspired by web standards to align React Native’s APIs across many platforms. These new props are purely additive so there are no expected migrations or change of behavior for equivalent accessibility, behavior, or style props.

For any new prop alias introduced, if there is an existing prop with a different name and both are specified, the new alias prop value will take precedence. For example, this release adds a src prop alias for source on the Image component to align with the src prop on web. If both src and source are provided, the new src prop will be used.

This includes support for aria-label as a prop alias of accessibilityLabel

Note

The RFC and discussion, linked from the docs, may be useful, for additional context

Proposed solution

Extend the existing user interactions tracking feature, to support aria-label in addition to accessibilityLabel
https://docs.datadoghq.com/real_user_monitoring/mobile_and_tv_monitoring/setup/reactnative/#user-interactions-tracking

Other relevant information

It may be useful to consider parity with browser RUM, which also includes support for label and placeholder

I think in theory it would be possible but support for these in RN Is not a standard

  • label - aria-labelledby / accessibilityLabelledBy
  • placeholder - aria-placeholder* placeholder

*not yet supported

@leggomuhgreggo leggomuhgreggo added the enhancement New feature or request label Sep 18, 2024
@marco-saia-datadog
Copy link
Member

Hi @leggomuhgreggo 👋

Thank you for your detailed suggestion, it is definitely something we want to introduce to align our SDK with this new React Native standard.

We have included this in our roadmap :)

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

No branches or pull requests

2 participants