1"use strict";(self.webpackChunkmarkuplint_website=self.webpackChunkmarkuplint_website||[]).push([[8660],{7308(e,n,i){i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>u,frontMatter:()=>s,metadata:()=>r,toc:()=>o});const r=JSON.parse('{"id":"rules/no-focusable-in-aria-hidden","title":"no-focusable-in-aria-hidden","description":"Warns when focusable interactive elements are placed inside an aria-hidden subtree.","source":"@site/docs/rules/no-focusable-in-aria-hidden.md","sourceDirName":"rules","slug":"/rules/no-focusable-in-aria-hidden","permalink":"/docs/rules/no-focusable-in-aria-hidden","draft":false,"unlisted":false,"editUrl":"https://github.com/markuplint/markuplint/edit/main/packages/@markuplint/rules/src/no-focusable-in-aria-hidden/README.md","tags":[],"version":"current","frontMatter":{"id":"no-focusable-in-aria-hidden","description":"Warns when focusable interactive elements are placed inside an aria-hidden subtree.","custom_edit_url":"https://github.com/markuplint/markuplint/edit/main/packages/@markuplint/rules/src/no-focusable-in-aria-hidden/README.md"},"sidebar":"rules","previous":{"title":"no-extra-selected-options","permalink":"/docs/rules/no-extra-selected-options"},"next":{"title":"no-hardcoded-id","permalink":"/docs/rules/no-hardcoded-id"}}');var a=i(4848),t=i(8453);const s={id:"no-focusable-in-aria-hidden",description:"Warns when focusable interactive elements are placed inside an aria-hidden subtree.",custom_edit_url:"https://github.com/markuplint/markuplint/edit/main/packages/@markuplint/rules/src/no-focusable-in-aria-hidden/README.md"},d="no-focusable-in-aria-hidden",c={},o=[{value:"Interface",id:"interface",level:2},{value:"Default Severity",id:"default-severity",level:2}];function l(e){const n={code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",strong:"strong",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"no-focusable-in-aria-hidden",children:(0,a.jsx)(n.code,{children:"no-focusable-in-aria-hidden"})})}),"\n",(0,a.jsx)(n.p,{children:"Warns when focusable interactive elements are placed inside an aria-hidden subtree."}),"\n",(0,a.jsxs)(n.p,{children:["\u274c Examples of ",(0,a.jsx)(n.strong,{children:"incorrect"})," code for this rule"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-html",children:'<div aria-hidden="true"><button>
1click</button></div>\n'})}),"\n",(0,a.jsxs)(n.p,{children:["\u2705 Examples of ",(0,a.jsx)(n.strong,{children:"correct"})," code for this rule"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-html",children:'<div aria-hidden="true"><span>text</span></div>\n'})}),"\n",(0,a.jsx)(n.h2,{id:"interface",children:"Interface"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-ts",children:'{\n "no-focusable-in-aria-hidden": boolean\n}\n'})}),"\n",(0,a.jsx)(n.h2,{id:"default-severity",children:"Default Severity"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.code,{children:"warning"})})]})}function u(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},8453(e,n,i){i.d(n,{R:()=>s,x:()=>d});var r=i(6540);const a={},t=r.createContext(a);function s(e){const n=r.useContext(t);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.