Repository navigation
fix: Disabled 'Next' button is not announced - #86888
Conversation
|
@Krishna2323 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f616e635d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
Note: The announcement differs slightly between IOS/MacOS and Android. On IOS/MacOS, the element is announced as "dimmed", whereas on Android, it is announced as "disabled". See https://www.a11y-101.com/development/aria-disabled for more details:
|
|
@truph01 whats the behaviour on desktop? The disabled button should be skipped in the tab order. |
@Krishna2323, could you share the discussion or reference that mentions this behavior? I may have missed it. Based on the Expected Behavior section in the original post, it seems the intended interaction is different:
|
|
I think we should just skip focusing in the disabled button (only on desktop). I tested with disabled "Comment" button when we post on GH. Try focusing on the "Comment" button without any text. |
|
🚧 @luacmartins has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
@Krishna2323 I think skipping focus on the disabled button (on desktop) would change the currently documented expected behavior in OP. Before moving forward with that approach, it would be good to get confirmation from the design or internal team. @rushatgabhane Could you help confirm? |
|
@truph01 it was confirmed by @dubielzyk-expensify but I couldn't find the thread. Let me check again. |
|
@Krishna2323 I left a comment on that thread. |
|
Jon replied :) |
|
@Krishna2323 Could you continue reviewing this PR? |
|
Reviewing... |
| // overriding any explicit aria-disabled we pass. We pass fullDisabled (not isDisabled) to | ||
| // preserve interaction/focus behavior, so we must set aria-disabled imperatively instead. | ||
| const internalRef = useRef<View>(null); | ||
| const isAriaDisabled = props.fullDisabled ?? props.disabled ?? props.accessibilityState?.disabled; |
There was a problem hiding this comment.
I think we should be using || here instead of nullish coalescing.
|
@truph01 have you tested the changes on physical iOS device? I can't do that but tried with
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid_hybrid.mp4Android: mWeb Chromeandroid_chrome.mp4iOS: HybridAppios_hybrid.mp4iOS: mWeb Safariios_safari.mp4MacOS: Chrome / Safariweb_chrome_jaws.mp4web_chrome_voiceover.mp4 |
|
Failing check doesn't seem related. |
|
@truph01 conflicts 🤷🏻 |
|
@inimaga friendly bump |
|
🚧 @inimaga has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/inimaga in version: 9.3.58-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required. This PR fixes a low-level accessibility bug in the internal Nothing in |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.3.58-9 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.3.58-9 🚀
|
Explanation of Change
accessibilityStatefrom itsdisabledprop, see this:, and react-native-web's Pressable always overwrites
aria-disabledthe same way, see this:— In both platforms,
disableddepends onfullDisabledApp/src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx
Line 180 in bb938fc
false, discarding theisDisabledstate computed by BaseGenericPressable.Fix (native): Changed
disabled={fullDisabled}→disabled={fullDisabled || undefined}inBaseGenericPressable. When not fully disabled, undefined skips the native override, lettingaccessibilityState={{disabled: isDisabled}}flow through intact.Fix (web): Added a
useLayoutEffectin index.tsx (web) that imperatively sets/removesaria-disabledon the DOM element after react-native-web renders, since RNW's Pressable always derives aria-disabled from its own disabled prop and cannot be overridden declaratively.Fixed Issues
$ #76908
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include ""[No QA].""
based on the platform.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-04-01.at.22.31.40.mov
Android: mWeb Chrome
Screen.Recording.2026-04-01.at.22.32.17.mov
iOS: Native
Screen.Recording.2026-04-01.at.22.37.23.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-04-01.at.22.30.23.mov