mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
1.6 KiB
Plaintext
1 line
1.6 KiB
Plaintext
|
{"version":3,"sources":["../sources/accessible-name.ts"],"names":["prohibitsNaming","node","computeAccessibleName","root","options"],"mappings":";;;;;AAAA;;AAIA;;AAEA;AACA;AACA;AACA,SAASA,eAAT,CAAyBC,IAAzB,EAA8C;AAC7C,SAAO,+BAAoBA,IAApB,EAA0B,CAChC,SADgC,EAEhC,MAFgC,EAGhC,UAHgC,EAIhC,UAJgC,EAKhC,SALgC,EAMhC,WANgC,EAOhC,WAPgC,EAQhC,cARgC,EAShC,QATgC,EAUhC,WAVgC,EAWhC,aAXgC,CAA1B,CAAP;AAaA;AAED;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,qBAAT,CACNC,IADM,EAGG;AAAA,MADTC,OACS,uEADgC,EAChC;;AACT,MAAIJ,eAAe,CAACG,IAAD,CAAnB,EAA2B;AAC1B,WAAO,EAAP;AACA;;AAED,SAAO,0DAAuBA,IAAvB,EAA6BC,OAA7B,CAAP;AACA","sourcesContent":["import {\n\tcomputeTextAlternative,\n\tComputeTextAlternativeOptions,\n} from \"./accessible-name-and-description\";\nimport { hasAnyConcreteRoles } from \"./util\";\n\n/**\n * https://w3c.github.io/aria/#namefromprohibited\n */\nfunction prohibitsNaming(node: Node): boolean {\n\treturn hasAnyConcreteRoles(node, [\n\t\t\"caption\",\n\t\t\"code\",\n\t\t\"deletion\",\n\t\t\"emphasis\",\n\t\t\"generic\",\n\t\t\"insertion\",\n\t\t\"paragraph\",\n\t\t\"presentation\",\n\t\t\"strong\",\n\t\t\"subscript\",\n\t\t\"superscript\",\n\t]);\n}\n\n/**\n * implements https://w3c.github.io/accname/#mapping_additional_nd_name\n * @param root\n * @param [options]\n * @parma [options.getComputedStyle] - mock window.getComputedStyle. Needs `content`, `display` and `visibility`\n */\nexport function computeAccessibleName(\n\troot: Element,\n\toptions: ComputeTextAlternativeOptions = {}\n): string {\n\tif (prohibitsNaming(root)) {\n\t\treturn \"\";\n\t}\n\n\treturn computeTextAlternative(root, options);\n}\n"],"file":"accessible-name.js"}
|