Giter Club home page Giter Club logo

Comments (6)

janosh avatar janosh commented on August 23, 2024 1

@egdegauperaa Thanks for reporting this. There's a comment in the component file about that input:

<!-- invisible input, used only to prevent form submission if required=true and no options selected -->
<input
{required}
bind:value={formValue}
tabindex="-1"
class="form-control"
on:invalid={() => (invalid = true)}
/>

I'm guessing it needs an attribute aria-hidden to silence your warning.

from svelte-multiselect.

egdegauperaa avatar egdegauperaa commented on August 23, 2024

@janosh I´m still getting the "missing form label" error when I run Wave in Chrome.

image

When I run VoiceOver on my Mac the screen reader ignores that input field, so aria-hidden seems to be the correct approach to hide something from a screen reader. I guess one approach to silence the error in Wave would be to add a hidden label for that input?

from svelte-multiselect.

janosh avatar janosh commented on August 23, 2024

@egdegauperaa Thanks for reporting back. I just installed WAVE and ran it on https://svelte-multiselect.netlify.app after wrapping the offending input in a <label> with some random text. The a11y error went away but that leaves a bunch of CSS issues with the input no longer properly hidden. Will try to tackle those tonight.

from svelte-multiselect.

egdegauperaa avatar egdegauperaa commented on August 23, 2024

HI @janosh I´d try to have the label separate (not wrap the input with the label).

from svelte-multiselect.

janosh avatar janosh commented on August 23, 2024

What if we add an aria-label instead of a label element? That seems to fix the error as well and doesn't require changing the markup. Took the suggestion from w3 docs: Approach 2: Using aria-label

But I wonder what the value for this attribute should be. Is it ok just to set it to "should be ignored".

from svelte-multiselect.

egdegauperaa avatar egdegauperaa commented on August 23, 2024

That sounds good, and maybe "Label to be ignored"?

from svelte-multiselect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.