Visitar URL original
question to principle4.guideline4_1.4_1_2.h91.inputtext.name · Issue #310 · squizlabs/HTML_CodeSniffer · GitHub
Skip to content

question to principle4.guideline4_1.4_1_2.h91.inputtext.name  #310

Open

Description

@LuciaLux

I have this input

<input _ngcontent-c1="" autocomplete="off" id="searchInput" name="query" required="" type="text" placeholder="Cerca" class="ng-untouched ng-pristine ng-invalid">

and the following error is generated:

Principle4.Guideline4_1.4_1_2.h91.InputText.Name 
THIS TEXTINPUT ELEMENT DOES NOT HAVE A NAME AVAILABLE TO AN ACCESSIBILITY API. VALID NAMES ARE: LABEL ELEMENT, TITLE UNDEFINED, ARIA-LABEL UNDEFINED, ARIA-LABELLEDBY UNDEFINED.

my question is:
the value given to the title, the ARIA-LABEL and the ARIA-LABELLEDBY, ie undefined, is correct?

Activity

  1. ironikart commented on Nov 3, 2022

    @ironikart
    Contributor

    The error looks correct to me. From the example you posted there is no programatic way to determine what accessible text is available. I'd suggest looking at the WCAG guidelines for possible remediations. The technique might not be exactly what you are after from the error message, but this should help: https://www.w3.org/WAI/WCAG22/Techniques/html/H44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions