Git Product home page Git Product logo

Comments (3)

Chalarangelo avatar Chalarangelo commented on May 17, 2024

This is an interesting suggestion. I'll check for conflicts and, if none exist, will try to implement it in v2.1. The class might not even be required, making it even simpler to use and remember.

from mini.css.

Chalarangelo avatar Chalarangelo commented on May 17, 2024

I just now got to dealing with this issue, sorry for the delay.

I was thinking of moving the inputs inside the labels, but this might have undesirable implications in terms of accessibility and/or mnemonics for people who use mini.css. I will look into this further in the following days and give you an update.

If you have the time, could you please provide me with an example of a web framework that could be a culprit causing this problem? Just for research!

from mini.css.

Chalarangelo avatar Chalarangelo commented on May 17, 2024

After some quick research, it seems like most people prefer explicit labeling of form controls, rather than implicit. Many of the sources I found state that implicit labeling can be a problem for screen readers. In fact, MDN states the following:

A widget can be nested inside its <label> element but even in that case, it is considered best practice to set the for attribute because some assistive technologies do not understand implicit relationships between labels and widgets.

Most ARIA guidelines I have found suggest using explicit over implicit labeling, at least for the time being. In fact, the latest draft of WCAG 2.0 doesn't even mention implicit labeling in its techniques (WCAG 2.0, H44).

Based on the fact that accessibility comes before compliance with web frameworks and seeing as most of the other CSS toolkits and frameworks use explicit labeling for most of their elements, I am closing the issue for now. If, at some point, implicit labeling becomes the norm, I would be glad to reopen the issue and change the way mini.css implements the checkbox and radio button components' labels.

from mini.css.

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.