You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not true, however, for XHTML documents even if served as HTML because the DTD doesn’t have lang but xml:lang only.
And yes, it’s totally okay to serve XHTML documents written in compatibility mode (e.g. with space before />) as text/html; in fact, this is good as recommended nowadays because it’s less buggy. It may not help the latest browsers as much as serving it as XML, but it does help authoring tools or download postprocessing tools which can go straight at it in XML.
The text was updated successfully, but these errors were encountered:
Axe-core's page-has-lang rule does allow xml:lang on XHTML doctype. These rule help pages aren't necessarily fully documenting everything the rule will do. They are designed to help developers solve a problem. Adding a lang attribute solves the problem, even if in some niche cases there is a second option.
Support for xml:lang in browsers and screen readers has been decreasing over the last few years. None of the major browser+AT combinations still support xml:lang in an HTML document, and they currently all prioritise lang over xml:lang if both exist in a page served with application/xhtml+xml.
Support for `xml:lang` in browsers and screen readers has been
decreasing over the last few years. None of the major browser+AT
combinations still support xml:lang in an HTML document, and they
currently all prioritise lang over xml:lang if both exist in a page
served with `application/xhtml+xml`.
The DTD does not allow the lang attribute though.
bye,
//mirabilos
--
> Why don't you use JavaScript? I also don't like enabling JavaScript in
Because I use lynx as browser.
+1
-- Octavio Alvarez, me and ⡍⠁⠗⠊⠕ (Mario Lang) on debian-devel
Product
axe-core
Product Version
No response
Latest Version
Issue Description
https://www.webpagetest.org links to https://dequeuniversity.com/rules/axe/4.4/html-has-lang?application=axeAPI describing that the
html
tag must have alang
attribute.This is not true, however, for XHTML documents even if served as HTML because the DTD doesn’t have
lang
butxml:lang
only.And yes, it’s totally okay to serve XHTML documents written in compatibility mode (e.g. with space before
/>
) astext/html
; in fact, this is good as recommended nowadays because it’s less buggy. It may not help the latest browsers as much as serving it as XML, but it does help authoring tools or download postprocessing tools which can go straight at it in XML.The text was updated successfully, but these errors were encountered: