WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: [EXT]Noscript getting flagged

for

From: Jared Smith
Date: Aug 4, 2020 7:48AM


Vaibhav Saraf wrote:

> After disabling the JS the page looks the same. That'll pass our test right?

<noscript> is not for accessibility purposes. It instead provides an alternative for when JavaScript is disabled. Learn more at https://webaim.org/techniques/javascript/alternatives#noscript It is a best practice to ensure that if JavaScript is not available that an alternative to any JavaScript-dependent content or functionality be provided - and that alternative also be accessible. If your page looks and functions that same with JavaScript disabled, then there would be no use for <noscript> at all.

> I asked about the aria-hidden thing because over the net I came across many pages where they were indicating to use <noscript aria-hidden=true> but they weren't explaining the reason.

I can think of no purpose for placing aria-hidden=true on <noscript>. This would hide the content within <noscript> from screen reader users that also have JavaScript disabled, which would occur somewhere around .7% of the time (https://webaim.org/projects/screenreadersurvey8/#javascript).

I'd strongly suggest that you and your team receive web accessibility training to provide you foundational accessibility knowledge.

Jared