pluginkollektiv / statify

Statify – statistics plugin for WordPress
https://wordpress.org/plugins/statify/
GNU General Public License v3.0
76 stars 22 forks source link

Fix label assignment on settings page #243

Open florianbrinkmann opened 1 year ago

florianbrinkmann commented 1 year ago

Describe the bug The checkboxes on the settings page do not have labels assigned correctly.

stklcode commented 1 year ago

Cannot confirm this.

All 4 checkboxes are - in my eyes - linked to the corresponding labels, i.e. clicking on the label toggles them. Same holds for the 3 input fields.

statify-243

The 2 checkboxes on the widget backside are also linked to their labels.

Tested in v1.8.4 and dev snapshot.

florianbrinkmann commented 1 year ago

Ah, I see! I tried the texts that are right from the checkbox. I checked how WordPress does it on the general settings page and there it is also the right text that is the label. But in the Statify case the meaningful labels are on the right, that’s true.

For me it’s confusing because I expect checkbox labels to are on the right of the checkbox :D Is that only me, or should we think about a way to switch the positions?

stklcode commented 1 year ago

We could think of something like

Logged in users: [ ] exclude (Default: no)

and make the “exclude“ (or whatever text we place there) the actual label.

This should be uniform across all settings. For the numeric inputs I do like the left labels and there is no real meaningful text to place anywhere else without repeating ourselves. We might omit the association here and just add a “title“ attribute there for a11y reasons.

florianbrinkmann commented 1 year ago

This should be uniform across all settings.

WP itself uses that only for checkboxes and radio buttons. Textfields use the left text as a label, but most those fields only have a field on the right with maybe a description below.

stklcode commented 1 year ago

For the radio buttons at the top we already have the right-hand labels. I’d be fine with that for checkboxes, too. And if that matches the WP core pages, even better 👍