application/ld+json script in head element

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

application/ld+json script in head element

Post by TomHTML »

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: 3508
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: application/ld+json script in head element

Post by Albert Wiersch »


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").

Post Reply