Skip to content

fix(toc): wrap children in an <li> for screen readers controls - #232

Merged
billhimmelsbach merged 6 commits into
nextfrom
a11y/wrap-toc-children-in-li
Jul 22, 2021
Merged

billhimmelsbach merged 6 commits into
nextfrom
a11y/wrap-toc-children-in-li

Conversation

@billhimmelsbach

@billhimmelsbach billhimmelsbach commented Jul 21, 2021 •

Copy link
Copy Markdown
Contributor
Fixes RM-1554

🧰 Changes

🧬 QA & Testing

  • Do accessibility tests (lighthouse/axe) now detect a compatible ul structure?
    before
    Screenshot-Google Chrome-Markdown Demo-on-07-21-2021-at-15 31 03
    after
    Screenshot-Google Chrome-Markdown Demo-on-07-21-2021-at-15 35 07

By adding a class to the children li, we can be more specific with our css in the accompanying PR:
https://github.com/readmeio/readme/pull/4831

Which means now there's no difference in styling, while keeping the better structure for screen readers 🎉
new-vs-old-styling
(screenshots are from local @readme/readme branch using these markdown changes. The local markdown playground still uses thee old bundle-hub2.css for its CSS, so there's some diff there in the PR app, but won't be present on @readme/readme)

@kellyjosephprice
kellyjosephprice temporarily deployed to markdown-pr-232 July 21, 2021 22:04 Inactive
@kellyjosephprice
kellyjosephprice temporarily deployed to markdown-pr-232 July 21, 2021 22:13 Inactive
@billhimmelsbach billhimmelsbach added the a11y Addressing or concerning accessibility label Jul 21, 2021
@kellyjosephprice
kellyjosephprice temporarily deployed to markdown-pr-232 July 21, 2021 22:25 Inactive
@billhimmelsbach
billhimmelsbach marked this pull request as ready for review July 21, 2021 22:28
@billhimmelsbach
billhimmelsbach requested review from rafegoldberg and removed request for rafegoldberg July 21, 2021 22:28
@billhimmelsbach
billhimmelsbach marked this pull request as draft July 21, 2021 22:39
@billhimmelsbach

Copy link
Copy Markdown
Contributor Author

Converting back to draft since there's some changes that still need to be made to fix the styling.

@kellyjosephprice
kellyjosephprice temporarily deployed to markdown-pr-232 July 22, 2021 10:37 Inactive
@billhimmelsbach

billhimmelsbach commented Jul 22, 2021 •

Copy link
Copy Markdown
Contributor Author

By adding a class to the children li, we can be more specific with our css in the accompanying PR:
https://github.com/readmeio/readme/pull/4831

Which means now there's no difference in styling, while keeping the better structure for screen readers 🎉
new-vs-old-styling
(screenshots are from local @readme/readme branch using these markdown changes. The local markdown playground still uses thee old bundle-hub2.css for its CSS, so there's some diff there in the PR app, but won't be present on @readme/readme)

@billhimmelsbach
billhimmelsbach marked this pull request as ready for review July 22, 2021 10:50
@kellyjosephprice
kellyjosephprice temporarily deployed to markdown-pr-232 July 22, 2021 10:53 Inactive
@kellyjosephprice
kellyjosephprice temporarily deployed to markdown-pr-232 July 22, 2021 10:56 Inactive
@billhimmelsbach
billhimmelsbach merged commit 6e983a3 into next Jul 22, 2021
@billhimmelsbach
billhimmelsbach deleted the a11y/wrap-toc-children-in-li branch July 22, 2021 14:19
rafegoldberg pushed a commit that referenced this pull request Jul 22, 2021
## Version 6.30.1-next.3

### 🛠 Fixes & Updates

* **toc:** wrap children in an <li> for screen readers controls ([#232](#232)) ([6e983a3](6e983a3))

<!--SKIP CI-->
@rafegoldberg

Copy link
Copy Markdown
Collaborator

This PR was released!

🚀 Changes included in v6.30.1-next.3

rafegoldberg pushed a commit that referenced this pull request Jul 22, 2021
## Version 6.30.1

### 🛠 Fixes & Updates

* **heading:** add aria-label to anchors ([#230](#230)) ([1df0220](1df0220))
* **A11y:** making copy code button accessible ([#228](#228)) ([2d8d594](2d8d594))
* **toc:** wrap children in an <li> for screen readers controls ([#232](#232)) ([6e983a3](6e983a3))

<!--SKIP CI-->
@rafegoldberg

Copy link
Copy Markdown
Collaborator

This PR was released!

🚀 Changes included in v6.30.1

This branch was previously deployed

1 inactive deployment
markdown-pr-232 — 9614c09c Deployed Jul 22, 2021 by kellyjosephprice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a11y Addressing or concerning accessibility released on @next released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants