fix(html): use div[role=note] for admonitions instead of blockquote#3115
Open
leno23 wants to merge 1 commit into
Open
fix(html): use div[role=note] for admonitions instead of blockquote#3115leno23 wants to merge 1 commit into
leno23 wants to merge 1 commit into
Conversation
Styled admonitions are callouts, not quotations. Use a div with role="note" for accessibility while keeping blockquote-tag classes for styling. Plain blockquotes without an admonition kind stay as blockquote elements. Fixes rust-lang#3026 Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[!NOTE],[!TIP], etc.) as<div role="note">instead of<blockquote>blockquote-tagCSS classes for styling compatibility<blockquote>elementsMotivation
Admonitions are callouts, not quotations. Using
blockquoteis semantically incorrect and can confuse screen readers.role="note"better matches their purpose (see #3026).Test plan
cargo test markdown::admonitions(snapshots updated)cargo test -p mdbook-htmlFixes #3026
Made with Cursor