Quantcast
Channel: Recent posts across whole site
Viewing all articles
Browse latest Browse all 49221

Filter h1, h2, and h3 tags from allowed html in comments

$
0
0

The semantic structure of a discussion can be ruined if a comment includes code for headings that are at a higher level than the title of each comment. In discussions in Drupal, the title of the page is an <h1>, key regions are headed with <h2>s (which sometimes do not appear on screen but are available to screen readers to define regions that are obvious on visual inspection), and each comment begins with an h3. So if any heading is added within a comment, it should be no higher than an <h4>, right?

For people who can see, an <h1> or <h2> in the middle of a comment is merely a visual anomaly. But for people who must rely on screen readers to determine the organization and content of a page, those misplaced headings can make the page ungrokable.

Drupal already filters the html allowed in comments. So to prevent people who are unaware of accessibility issues from making an otherwise accessible discussion fail WCAG, why not remove <h1>, <h2>, and <h3> from the list of tags allowed in comments?


Viewing all articles
Browse latest Browse all 49221

Trending Articles