ng-hub-ui-forms 22.33.0 → 22.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -748,6 +748,23 @@ import { HubSignalFieldControl, hubSignalErrorMessages } from 'ng-hub-ui-forms/s
|
|
|
748
748
|
## ♿ Accessibility
|
|
749
749
|
|
|
750
750
|
- Labels are associated with their control (`for`/`id`); required fields are marked.
|
|
751
|
+
- **`labelType="visually-hidden"` names a control that has no room for a visible label.** A
|
|
752
|
+
toolbar search box or a compact grid cell cannot repeat the same word down every row, and the
|
|
753
|
+
alternative was a control with no accessible name at all — a placeholder is not a name. The
|
|
754
|
+
label is still rendered and still bound to the control; only the pixels go, clipped out of the
|
|
755
|
+
page rather than removed with `display: none`, which would take the name with them. Honoured by
|
|
756
|
+
every field, checkboxes and switches included.
|
|
757
|
+
|
|
758
|
+
```html
|
|
759
|
+
<hub-input formControlName="q" label="Search orders" labelType="visually-hidden" placeholder="Search" />
|
|
760
|
+
```
|
|
761
|
+
|
|
762
|
+
A hidden label rather than an `aria-label` on purpose: a label stays *associated* with its
|
|
763
|
+
control, so it is one string in the template that both the eye and the screen reader can be
|
|
764
|
+
given or denied, and it never silently replaces a name the application set for itself. The two
|
|
765
|
+
exceptions are `hub-otp-input` and `hub-segmented`, which render a group rather than a single
|
|
766
|
+
control: a `<label for>` aimed at a `<div>` names nothing, so those two carry the text on the
|
|
767
|
+
group as `aria-label`.
|
|
751
768
|
- `required` — set inline or derived from `Validators.required`, with `formControlName` **or** a direct `[formControl]` binding — is reflected as `aria-required` on every field, including the select's combobox search input, the segmented `radiogroup` and each OTP cell. On a reactive binding the control's validators decide: an inline `required` is overwritten by them, so declare it on the validators. Template-driven bindings (`ngModel`) keep honouring the inline input.
|
|
752
769
|
- Validation errors render in an `role="alert"` region tied to the field.
|
|
753
770
|
- The select exposes correct combobox/listbox semantics; the datepicker is fully keyboard-navigable.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ng-hub-ui-forms",
|
|
3
|
-
"version": "22.33.
|
|
3
|
+
"version": "22.33.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Accessible, signal-based form fields for Angular (input, textarea, slider, segmented, select, datepicker, file input with drag & drop and upload progress) with automatic error display for controls, FormGroups and FormArrays. Reactive Forms today, Signal Forms ready. Part of the ng-hub-ui family.",
|
|
6
6
|
"author": "Carlos Morcillo <carlos.morcillo@me.com> (https://www.carlosmorcillo.com)",
|