Skip to content

Aria-label that indicates scrolling behaviour interferes in headings content for screen readers #698

New issue

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

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

Already on GitHub? Sign in to your account

Merged

Conversation

marinaaisa
Copy link
Member

@marinaaisa marinaaisa commented Jun 20, 2023

Bug/issue #111006953, if applicable:

Summary

Aria-label that indicates scrolling behaviour interferes in headings content for screen readers

It's been fixed by restructuring how the anchor link is set and adding AX description that should read: Content of heading + "in page link" to describe that the link is within the page.

Screenshot 2023-06-26 at 20 30 31

Dependencies

NA

Testing

Steps:

  1. Run any doccarchive
  2. Go to section title
  3. Assert that you can read its content using VoiceOver

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran npm test, and it succeeded
  • Updated documentation if necessary

@marinaaisa marinaaisa marked this pull request as ready for review June 26, 2023 18:34
@marinaaisa
Copy link
Member Author

@swift-ci test

:id="anchor"
:is="`h${level}`"
>
<div class="heading-wrapper">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One downside to this restructuring of elements is that now you have to click the actual icon in order to get the link for the heading whereas before you could click anywhere within the title itself, which seemed like a better experience to me.

Is there a way of keeping that same behavior as before while also addressing the screen reader issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took another approach and I continued with the previous experience. So the change isn't too much f9ce461

Copy link
Contributor

@dobromir-hristov dobromir-hristov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good, its a bit close to how Vue docs render, apart from the position of the anchor itself.

@marinaaisa marinaaisa force-pushed the r111006953/headings-screen-readers branch from 80e76a4 to f9ce461 Compare June 27, 2023 15:53
Copy link
Contributor

@mportiz08 mportiz08 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simpler approach works great 🚀

The tests are failing now though and need to be updated.

@marinaaisa marinaaisa requested a review from mportiz08 June 27, 2023 17:24
@marinaaisa
Copy link
Member Author

@swift-ci test

@mportiz08 mportiz08 merged commit d90bfef into swiftlang:main Jun 27, 2023
@mportiz08 mportiz08 deleted the r111006953/headings-screen-readers branch June 27, 2023 17:34
marinaaisa added a commit to marinaaisa/swift-docc-render that referenced this pull request Jun 28, 2023
…content for screen readers (swiftlang#698)

Resolves: rdar://111006953
marinaaisa added a commit that referenced this pull request Jun 28, 2023
…content for screen readers (#698) (#705)

Resolves: rdar://111006953
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.

3 participants