RE: Where to file a bug on a bookmarklet?

Thank you, Jukka, for both recommendation to contact Steve directly and for your coding suggestion.

From: Jukka K. Korpela <jukkakk@gmail.com>
Sent: Thursday, October 3, 2019 2:16 AM
To: Lisa Louise Davis (Aquent) <v-lidav@microsoft.com>
Cc: Philip Taylor <P.Taylor@rhul.ac.uk>; www-validator@w3.org
Subject: Re: Where to file a bug on a bookmarklet?

I think I understand the problem now. You must be using the tool  described at
https://developer.paciellogroup.com/blog/2019/02/wcag-2-0-parsing-error-bookmarklet/<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper.paciellogroup.com%2Fblog%2F2019%2F02%2Fwcag-2-0-parsing-error-bookmarklet%2F&data=02%7C01%7Cv-lidav%40microsoft.com%7C5880e31b80744693df9508d747e25f4c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637056909904366148&sdata=iOsu1HJhKiOSyNlQrc43cZDKMAkvAiuVLF1ToUbwBAQ%3D&reserved=0>
(The URL is misleading, since the content now relateds to WCAG 2.1, not 2.0.)
The tool is called "WCAG Parsing Bookmarklet", and the short instructions are at
https://cdpn.io/stevef/debug/VRZdGJ<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcdpn.io%2Fstevef%2Fdebug%2FVRZdGJ&data=02%7C01%7Cv-lidav%40microsoft.com%7C5880e31b80744693df9508d747e25f4c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637056909904376139&sdata=DGGpYjZKB14LD1dmZbjpL2TnZhQUBCe3lKJJUS8zLfg%3D&reserved=0>

The tool seems to be a creation of Steve Faulkner alone and distributed via his page,
so I think bugs should be reported to him directly. However, this issue can probably
be handled with a simple edit of the code.

Using this tool on the page linked to in the original message,
https://www.uwb.edu/brand/website/accessibility/examples/inaccessible-page<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.uwb.edu%2Fbrand%2Fwebsite%2Faccessibility%2Fexamples%2Finaccessible-page&data=02%7C01%7Cv-lidav%40microsoft.com%7C5880e31b80744693df9508d747e25f4c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637056909904376139&sdata=SpGcpqskYyUUEWUfjP0zNNeKJL8%2F%2F6r2cQ8Sn4Eq%2F4E%3D&reserved=0>
does not demonstrate the problem, since that page has no "End tag form seen..." error.
However, the problem can be seen using a trivial test document like
<!doctype html>
<form>
<div>
</form>
This causes an  "End tag form seen..." message, which is hidden when the bookmarklet is used.
The question is how to prevent this hiding.

It seems that the intention in the code is to avoid hiding such messages, but this does not happen.
The bookmarklet begins this way:

javascript:(function(){var removeNg=true;var filterStrings=["tag seen","Stray end tag","Bad start tag","violates nesting rules","Duplicate ID","first occurrence of ID","Unclosed element","not allowed as child of element","unclosed elements","not allowed on element","unquoted attribute value","Duplicate attribute"];var

The filterStrings variable is meant to specify error messages that shall not be hidden, referring to them with fragments of the message text. This fails for the  "End tag form seen..." error., since the message text does not contain the string "tag seen" (there is a tag name, like "form" in this case, between the two words. To fix this, we can replace the string with one that occurs in the message, like the invariant part after the tag name,

javascript:(function(){var removeNg=true;var filterStrings=["seen, but there were open elements", "Stray end tag","Bad start tag","violates nesting rules","Duplicate ID","first occurrence of ID","Unclosed element","not allowed as child of element","unclosed elements","not allowed on element","unquoted attribute value","Duplicate attribute"];var filterRE,root,results,result,resultText,i,cnt=0;filterRE=filterStrings.join("|");root=document.getElementById("results");if(!root){alert("No results container found.");return}results=root.getElementsByTagName("li");for(i=0;i<results.length;i++){result=results[i];if(result.className!==""){resultText=(result.innerText!==undefined?result.innerText:result.textContent)+"";if(resultText.match(filterRE)===null){result.style.display="none";result.className=result.className+" steveNoLike";cnt++}else if(removeNg==true){if(resultText.indexOf("not allowed on element")!==-1&&resultText.indexOf("ng-")!==-1){result.style.display="none";result.className=result.className+" steveNoLike";cnt++}}}}alert("Complete. "+cnt+" items removed.")})();

Jukka

ke 2. lokak. 2019 klo 20.37 Lisa Louise Davis (Aquent) (v-lidav@microsoft.com<mailto:v-lidav@microsoft.com>) kirjoitti:
Hi, Philip –
Thanks for replying!
Please use the Check serialized DOM of current page bookmarklet to generate initial results. Then use the Check for WCAG 2.0 parsing compliance bookmarklet to filter them.
Lisa Louise

From: Philip Taylor <P.Taylor@Rhul.Ac.Uk<mailto:P.Taylor@Rhul.Ac.Uk>>
Sent: Monday, September 30, 2019 11:36 AM
To: Lisa Louise Davis (Aquent) <v-lidav@microsoft.com<mailto:v-lidav@microsoft.com>>
Cc: www-validator@w3.org<mailto:www-validator@w3.org>; jukkakk@gmail.com<mailto:jukkakk@gmail.com>
Subject: Re: Where to file a bug on a bookmarklet?

Lisa Louise Davis (Aquent) wrote:
Still hoping for an answer to my question.

Jukka has already noted that :

Using the W3C validator directly on the page mentioned,
https://www.uwb.edu/brand/website/accessibility/examples/inaccessible-page<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.uwb.edu%2Fbrand%2Fwebsite%2Faccessibility%2Fexamples%2Finaccessible-page&data=02%7C01%7Cv-lidav%40microsoft.com%7C5880e31b80744693df9508d747e25f4c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637056909904386133&sdata=QBxoS18sCqaA2LAnH6CxwQn2sEfz3zdVubsGPZdy8BQ%3D&reserved=0>
does not seem to cause any messages (hidden or visible) of the type "End tag form seen, but there were open elements.”

with which analysis I agree.  Thus there does not appear to be a bug to report.
Philip Taylor

Received on Thursday, 3 October 2019 16:14:20 UTC