-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aXe fails on XHTML documents with prefixed element names #563
Comments
rdeltour
added a commit
to daisy/ace
that referenced
this issue
Oct 9, 2017
aXe is creating CSS selectors for relevant elements in the checked content. When faced with XML-namespaced element names (e.g. MathML elements), it used the prefixed element name as a selector for the element, which caused a syntax error when matching against this selector. To fix this, we copy part of aXe's code in our own file as a monkey patch. This must be removed when dequelabs/axe-core#563 is fixed. Closes #57
rdeltour
pushed a commit
to rdeltour/axe-core
that referenced
this issue
Oct 24, 2017
- by default, ensure the nodename is escaped - for XHTML documents, only use the local name Replaces dequelabs#566 Closes dequelabs#563
This was referenced Nov 3, 2017
rdeltour
pushed a commit
to rdeltour/axe-core
that referenced
this issue
Dec 15, 2017
- by default, ensure the nodename is escaped - for XHTML documents, only use the local name Replaces dequelabs#566 Closes dequelabs#563
rdeltour
pushed a commit
to rdeltour/axe-core
that referenced
this issue
Dec 15, 2017
- by default, ensure the nodename is escaped - for XHTML documents, only use the local name Replaces dequelabs#566 Closes dequelabs#563
WilcoFiers
pushed a commit
that referenced
this issue
Dec 15, 2017
) * feat(utils): add function `isXHTML` to test if a document node is XHTML * test(utils): add a test for `axe.utils.isXHTML` on an XHTML document * fix(getSelector): improve selectors for namespaced elements - by default, ensure the nodename is escaped - for XHTML documents, only use the local name Replaces #566 Closes #563 * test(getSelector): add a test for `axe.utils.getSelector` on a namespaced XHTML element
WilcoFiers
pushed a commit
that referenced
this issue
Dec 15, 2017
) * feat(utils): add function `isXHTML` to test if a document node is XHTML * test(utils): add a test for `axe.utils.isXHTML` on an XHTML document * fix(getSelector): improve selectors for namespaced elements - by default, ensure the nodename is escaped - for XHTML documents, only use the local name Replaces #566 Closes #563 * test(getSelector): add a test for `axe.utils.getSelector` on a namespaced XHTML element
mrtnvh
pushed a commit
to mrtnvh/axe-core
that referenced
this issue
Nov 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When ran against an XHTML document with namespaced elements, aXe crashes with a syntax error on the
matchesSelector
function.This is due to the selector creation using the element’s
nodeName
, which results in an (invalid) selector of the formprefix:name
.Since the DOM Standard doesn't plan to support namespaces with selectors, the best approach would probably be to use the element’s local name as the selector (instead of the prefixed node name).
This can be reproduced with the following document:
The text was updated successfully, but these errors were encountered: