Skip to content

Conversation

@ramiy
Copy link
Contributor

@ramiy ramiy commented Jan 2, 2026

Description

The article about <hr> element is basic. We can add additional examples.

@ramiy ramiy requested a review from a team as a code owner January 2, 2026 18:55
@ramiy ramiy requested review from estelle and removed request for a team January 2, 2026 18:55
@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs size/m [PR only] 51-500 LoC changed labels Jan 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

Preview URLs

(comment last updated: 2026-01-06 10:05:31)

Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

i don't htink we should be using the li examples

@ramiy
Copy link
Contributor Author

ramiy commented Jan 5, 2026

@estelle Thanks for the feedback. You’re absolutely right, it wasn’t a good example. I’ve replaced it with a more practical one. I’d love to hear your thoughts.

@ramiy ramiy requested a review from estelle January 6, 2026 07:56
<li>Cut</li>
<li>Copy</li>
<li>Paste</li>
<li role="presentation"><hr /></li>
Copy link
Member

Choose a reason for hiding this comment

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

i have been marinating over this example, and have asked a few people in the a11y community their thoughts.

Feedback was:

Use aria-hidden="true" in place of role="presentation" to completely remove the list item from the accessibility tree to keep it from being enumerated. The <hr> might have a functional purpose in that it clusters related content, but may be more confusing/annoying to a blind person than helpful, even if it is more "semantically pure."

Technically, it is a valid and accessible example, but is it a good one? Generally, if I need to create a thematic break between list items, I close out the list and open up a new list with the next "theme".

As MDN is considered gospel in many in-shop arguments over whether something is a good idea or not, I think we should omit valid content if there is a better, recommended way of doing it. By including this example, we are essentially saying "this is a good idea". So, while <hr> represents a thematic break between elements, all elements, not just paragraph level ones, it doesn't mean we need to demonstrate every use case. We should limit it to recommended use cases. I don't think we should be recommending this use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:HTML Hypertext Markup Language docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants