A link with class .nolink
Another link with class .nolink
A link with no classes
{"ScriptPreparationCode":null,"TestCases":[{"Name":"querySelectorAll","Code":"document\r\n .querySelectorAll(\u0027.nolink a\u0027)\r\n .forEach(noLink =\u003E {\r\n noLink.setAttribute(\u0027role\u0027, \u0027link\u0027);\r\n noLink.setAttribute(\u0027aria-disabled\u0027, \u0027true\u0027);\r\n noLink.removeAttribute(\u0027href\u0027);\r\n noLink.removeAttribute(\u0027rel\u0027);\r\n });","IsDeferred":false},{"Name":"Array.prototype","Code":"const noLinks = document.getElementsByClassName(\u0027nolink\u0027);\r\nArray.prototype.forEach.call(noLinks, function(noLink) {\r\n const matches = noLink.getElementsByTagName(\u0027a\u0027)[0];\r\n matches.setAttribute(\u0027role\u0027, \u0027link\u0027);\r\n matches.setAttribute(\u0027aria-disabled\u0027, \u0027true\u0027);\r\n matches.removeAttribute(\u0027href\u0027);\r\n matches.removeAttribute(\u0027rel\u0027);\r\n});","IsDeferred":false},{"Name":"getElementsByClassName \u002B getElementsByTagName","Code":"const noLinks = document.getElementsByClassName(\u0027nolink\u0027);\r\nfor (let noLink of noLinks) {\r\n const matches = noLink.getElementsByTagName(\u0027a\u0027)[0];\r\n matches.setAttribute(\u0027role\u0027, \u0027link\u0027);\r\n matches.setAttribute(\u0027aria-disabled\u0027, \u0027true\u0027);\r\n matches.removeAttribute(\u0027href\u0027);\r\n matches.removeAttribute(\u0027rel\u0027);\r\n};","IsDeferred":false},{"Name":"getElementsByClassName \u002B querySelector","Code":"const noLinks = document.getElementsByClassName(\u0027nolink\u0027);\r\nfor (let noLink of noLinks) {\r\n const matches = noLink.querySelector(\u0027a\u0027)\r\n matches.setAttribute(\u0027role\u0027, \u0027link\u0027);\r\n matches.setAttribute(\u0027aria-disabled\u0027, \u0027true\u0027);\r\n matches.removeAttribute(\u0027href\u0027);\r\n matches.removeAttribute(\u0027rel\u0027);\r\n};","IsDeferred":false}]}