Skip to content

Accessibility - Pressable does not render with aria-checked #2403

@penx

Description

@penx

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

The following code

    <Pressable
      accessibilityLabel="label"
      accessibilityRole="radio"
      accessibilityState={{ checked: true }}
    >
      Example
    </Pressable>

renders as

<div aria-label="label" role="radio" tabindex="0">Example</div>

Which includes the label and role attributes but does not include aria-checked

Expected behavior

Should render as

<div aria-label="label" role="radio" tabindex="0" aria-checked="true">Example</div>

Steps to reproduce

[email protected]

As per code code sandbox test case.

Test case

https://codesandbox.io/s/react-native-web-checked-1ej4me

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions