Skip to content

svg-focusable

Reports an <svg> that has no focusable attribute.

Internet Explorer 11 and old Edge make every <svg> a stop of the Tab key unless it says focusable="false".

To fix, add focusable="false".

Reported
...
<svg><path d=""></path></svg>
<svg focusable="false"></svg>
...
angular:
lint:
rules:
svg-focusable: warn # off (default), warn, error
html:
lint:
rules:
svg-focusable: warn # off (default), warn, error
svelte:
lint:
rules:
svg-focusable: warn # off (default), warn, error
vue:
lint:
rules:
svg-focusable: warn # off (default), warn, error

Suppress one line with sudsy-disable-next-line svg-focusable in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
html-validate svg-focusable full