application/ld+json script in head element

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
TomHTML
Rank II - Novice
Rank II - Novice
Posts: 28
Joined: Sun Feb 04, 2018 10:19 am

application/ld+json script in head element

Post by TomHTML » Fri Mar 23, 2018 9:02 pm

I'm employing an application/ld+json script with schema information, including a bread crumb list, etc., in the head element. The validator responds to it this way:
When designing web pages, consider that scripts and programmatic objects pose potential accessibility problems for users: 1) some user agents, like the Lynx text-only browser, do not support scripts, 2) scripts can cause problems with screen readers, 3) some users disable scripts even though their user agent supports them, and 4) scripts are sometimes disabled in schools, libraries, and public access places.
Provided the importance of schema info in such a script block, might the validator not issue this particular warning? (Or are application/ld+json scripts posing a problem for screen readers, etc., in a way that could be handled better by the HTML coder? If so, how? (Is there an ARIA attribute that could be applied to the script tag itself to solve this? I can't think of one.)

Many thanks!

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3359
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: application/ld+json script in head element

Post by Albert Wiersch » Mon Mar 26, 2018 9:54 am

Hello,

That should be a regular message (not an error and not a warning).

I've changed it so that future updates will not generate this message for script elements that don't actually contain script (like when type="application/ld+json").

Thanks!
Image
Albert Wiersch

Post Reply