Skip to content

Conversation

@ksiler
Copy link
Contributor

@ksiler ksiler commented Feb 20, 2025

Platforms Impacted

  • iOS
  • macOS
  • win32 (Office)
  • windows
  • android

Description of changes

Previously, if we didn't find a string as a child of LinkV1 and called .toString(), we ran into an error. This fixes it by simplyfing the code to just return the first child that's a string (if it exists) instead of calling .toString() on the result. We use this to set the a11yLabel if one isn't defined.

Verification

Tested by creating a Link without any children. Verified FURN test app no longer runs into an error.

Before After
Screenshot or description before this change Screenshot or description with this change

Pull request checklist

This PR has considered (when applicable):

  • Automated Tests
  • Documentation and examples
  • Keyboard Accessibility
  • Voiceover
  • Internationalization and Right-to-left Layouts

@ksiler ksiler requested a review from a team as a code owner February 20, 2025 21:24
@ksiler ksiler changed the title [LinkV1] Check if we find a string as a child of LinkV1 before calling .toString() [LinkV1] Simplify code to find child string of LinkV1 when setting a11yLabel Feb 20, 2025
@ksiler ksiler closed this Feb 20, 2025
@ksiler ksiler reopened this Feb 20, 2025
@ksiler
Copy link
Contributor Author

ksiler commented Feb 20, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ksiler ksiler merged commit 91d4ef1 into microsoft:main Feb 20, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants