WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: HTML Anchor Syntax Question

for

From: Mark Magennis
Date: Dec 14, 2022 12:47AM


Jim,

I can't access the page you referenced but if a heading is also a link, it is best if the link is within the heading, not the heading within the link. This is because in VoiceOver/Safari, headings that are within links aren't announced as headings when the button is tabbed to or arrowed to. And when navigated to using the 'h' shortcut, the heading level is not announced. In JAWS/Chrome and NVDA/Firefox there is no difference.

There may also be an effect on the clickable . Notwithstanding other CSS treatments, if the link is within the heading, only the text is clickable. Whereas if the heading is within the link, the entire rectangular area encompassing the heading becomes clickable.

Mark