Allow autocomplete URL tokens on input type=url - #327
Open
cpruijsen wants to merge 1 commit into
Open
Conversation
isUrl treated type=url as outside the URL control group, so valid markup such as autocomplete="url" was reported as H98.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
isUrlnow acceptstype="url", so WCAG 1.3.5 (H98) no longer reportsautocomplete="url"(andphoto/impp) as an error.input type="url"was outside the URL autocomplete control group.Fixes #325. Confirmed against the WordPress comment-form website field in https://core.trac.wordpress.org/ticket/64307 (
<input type="url" autocomplete="url">).Summary
isUrlmatches the other specialised groups (tel,number,date) and the HTML autocomplete control-group table. Spec: URL group is hidden / text / search / url / textarea / select (HTML 5.2 and WHATWG).The patch adds
urltoisUrland leaves the existingemailclause in place. Replacingemailwithurlwould match the spec exactly (emailis the Username group, which this sniff does not implement), but would newly flagtype="email"plus URL tokens. That is a separate spec-accuracy change. Can dropemailif you prefer spec-strict grouping.Test plan
Tests/WCAG2/1_3_5_Autocomplete_Url.html: no Error*.H98ontype=url+autocomplete=url/photo; still no error ontype=text; still Error ontype=numbertype=urlassertions when theisUrlline is revertednpm test(grunt eslint)Contrib/Testing/HTMLCS_Test.js Tests/WCAG2/1_3_5_Autocomplete_Url.htmlif you have PhantomJS<input type="url" autocomplete="url">(WordPress comment form)