8000 html-has-lang false positive with Browser MCP · Issue #4798 · dequelabs/axe-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
html-has-lang false positive with Browser MCP #4798
Open
@WilcoFiers

Description

@WilcoFiers

I started noticing this false positive when I had the Browser MCP extension installed:

browser-mcp-container custom element with html in the shadow root

Apparently this injects a custom browser-mcp-container element which has its own HTML element. The browser's parser prevents adding multiple HTML elements to the page, and so axe seems to assume that when it queries the html element the only thing it could ever possibly match is the root. That's not correct. Instead of selecting the HTML element html-has-lang should select :root.

I don't think this is just a shadow DOM issue. I suspect you can also document.createElement('html') and then append that to the DOM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixBug fixesrulesIssue or false result from an axe-core rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0