Skip to content
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

link-alt to fix card link accessibility not working for a page #101

Closed
bertiewooster opened this issue Sep 30, 2022 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@bertiewooster
Copy link

bertiewooster commented Sep 30, 2022

Describe the bug

context
When we make a page in RST with cards.

expectation
I expected each card link to have a discernible name.

bug
But instead there is no discernible name for the card link

problem
This is a problem for people using screen readers because the screen reader will not speak to them a meaningful name for the link.

This seems to be a bug with #78.

Reproduce the bug

From the RST source, for the page that is built, Lighthouse still reports the issue Links do not have a discernible name.

RST includes:

.. grid:: 2

   .. grid-item-card:: Tutorials :material-sharp:`school;3em;item-card-icon`
      :link: tutorials
      :link-type: ref

which seems to match the format given in the sphinx-design documentation.

List your environment

No response

@bertiewooster bertiewooster added the bug Something isn't working label Sep 30, 2022
@chrisjsewell
Copy link
Member

Hey @bertiewooster, as mentioned in #78, this was closed in #89 by the addition of the link-alt option, have you tried using that?

@bertiewooster
Copy link
Author

@chrisjsewell thanks. Oh, I didn't realize that a card would have to have a new option link-alt.

My thinking was that the card would automatically use the name of the card (in the example below, Tutorials) as the name for the link. That way, documentation writers wouldn't have to do anything additional to meet accessibility guidelines, thus making pages accessible by default.

As it's set up now, it seems like adding link-alt as in the following example would do the trick? (I didn't find link-alt in the clickable cards documentation.)

   .. grid-item-card:: Tutorials :material-sharp:`school;3em;item-card-icon`
      :link: tutorials
      :link-type: ref
      :link-alt: Tutorials

cc @asmeurer

@chrisjsewell
Copy link
Member

I believe this is fixed in #183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants