Skip to content

Add screen reader text to icon-only links in forms chapter - #1912

Open
anaschwendler wants to merge 1 commit into
DjangoGirls:masterfrom
anaschwendler:accessible-icon-links
Open

anaschwendler wants to merge 1 commit into
DjangoGirls:masterfrom
anaschwendler:accessible-icon-links

Conversation

@anaschwendler

@anaschwendler anaschwendler commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

The new post and edit post links only contained an SVG icon, so screen readers announced them without any meaningful name. Add a Bootstrap visually-hidden label to every snippet and briefly explain why.

Refs #1522.

The "New post" and "Edit post" links in the Django Forms chapter only contain an SVG icon, so screen readers announce them as a link with no meaningful name.

Changes (English only, translations come from Crowdin)

  • Add <span class="visually-hidden">New post</span> / Edit post to every snippet with these icon links (8 snippets). visually-hidden is the Bootstrap 5 utility class, and the tutorial already loads Bootstrap 5.3.3, so nothing changes visually.
  • After the first snippet, add a short paragraph explaining what screen readers are and why the hidden text is there, so attendees pick up the habit.

About the rest of #1522

  • The <div> → <header> suggestion is already done: the templates use <header class="page-header">.
  • The delete and login links mentioned in the issue live in the tutorial extensions, not in this repository, so they aren't covered here.

The English book builds fine with make build LANG=en, and the hidden labels show up in the generated HTML.

@das-g

The new post and edit post links only contained an SVG icon, so screen
readers announced them without any meaningful name. Add a Bootstrap
visually-hidden label to every snippet and briefly explain why.

Refs DjangoGirls#1522

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant