Skip to content
New issue

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

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

Already on GitHub? # to your account

Add disabled trait to tab bar item view #2079

Merged
merged 3 commits into from
Jul 30, 2024

Conversation

joannaquu
Copy link
Contributor

@joannaquu joannaquu commented Jul 29, 2024

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

When TabBarItemView is disabled, VoiceOver/the accessibility inspector do not accurately report that it is disabled. Update it so that we add/remove the notEnabled accessibility trait when isEnabled changes.

Binary change

I no longer trust this at all. I triple checked this and somehow adding traits decreases our binary size??? I also confirmed that I wasn't doing the before/after comparison in the wrong direction.

Total increase: 48 bytes
Total decrease: -368 bytes

File Before After Delta
Total 32,172,808 bytes 32,172,488 bytes 🎉 -320 bytes
Full breakdown
File Before After Delta
__.SYMDEF 4,887,416 bytes 4,887,464 bytes ⚠️ 48 bytes
TabBarItemView.o 236,952 bytes 236,584 bytes 🎉 -368 bytes

Verification

Visual Verification
Before After
before after

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • iOS supported versions (all major versions greater than or equal current target deployment version)
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
  • iPad Pointer interaction
  • SwiftUI consumption (validation or new demo scenarios needed)
  • Objective-C exposure (provide it only if needed)
Microsoft Reviewers: Open in CodeFlow

@joannaquu joannaquu requested a review from a team as a code owner July 29, 2024 18:45
@joannaquu joannaquu merged commit 224dab9 into microsoft:main Jul 30, 2024
7 checks passed
@joannaquu joannaquu deleted the joannaqu/disabled-accessibility branch July 30, 2024 20:14
@harrieshin harrieshin mentioned this pull request Aug 16, 2024
12 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants