react-navigation / react-navigation

Routing and navigation for your React Native apps
https://reactnavigation.org
23.58k stars 5.04k forks source link

aria-selected should not be set on role link #9418

Open SampsonCrowley opened 3 years ago

SampsonCrowley commented 3 years ago

Current Behavior

the current DrawerItem passes accessibilityState to Link. this is an invalid attribute for role="link"

Expected Behavior

also exclude accessibilityState from Link in the default DrawerItem

all that really needs to be done is add a line under this line with accessibilityState, to exclude it from rest, and pass it manually to PlatformPressable

I would open a simple PR, but I'm on a phone and I don't have time to write tests or a computer at the moment.

How to reproduce

Here's a simple snack: https://snack.expo.io/x4ass6Am_

Your Environment

software version
iOS or Android Web
@react-navigation/drawer 5.12.4
software version
iOS or Android Web
@react-navigation/native 5.9.3
@react-navigation/drawer 5.12.4
react-native-reanimated all
react-native-gesture-handler all
react-native-safe-area-context all
react-native-screens all
react-native all
expo all
node all
npm or yarn all

(other items in the table are irrelevant, as the offending code only exists in the lines of code I linked above)

github-actions[bot] commented 3 years ago

Couldn't find version numbers for the following packages in the issue:

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

SampsonCrowley commented 3 years ago

fine, I added native version number event though it's completely irrelevant to the offending line of code

YutamaKotaro commented 3 years ago

I wonder... this issue was resolved in v5 now, but still alive in v6, right ??

So, may I make pull request for this issue of v6 ? If it's ok, I'd like to do it 🙇🏻

Vishu7758 commented 1 year ago

Is this issue still open> If yes I would like to work on this :)