Commit 0bbb9f3
authored
feat(toggle): add required prop (#30156)
Issue number: resolves internal
---------
<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->
<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->
## What is the current behavior?
- Currently, the screen reader do not announce the component as required
when `required={true}`.
## What is the new behavior?
- Added a new `required` prop to be used for accessibility purposes that
adds the `required` attribute to toggle's inner native input.
## Does this introduce a breaking change?
- [ ] Yes
- [x] No
<!--
If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->1 parent 166e435 commit 0bbb9f3
File tree
6 files changed
+52
-3
lines changed- core
- src
- components/toggle
- test
- packages
- angular/src/directives
- vue/src
6 files changed
+52
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1945 | 1945 | | |
1946 | 1946 | | |
1947 | 1947 | | |
| 1948 | + | |
1948 | 1949 | | |
1949 | 1950 | | |
1950 | 1951 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3284 | 3284 | | |
3285 | 3285 | | |
3286 | 3286 | | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
3287 | 3291 | | |
3288 | 3292 | | |
3289 | 3293 | | |
| |||
8163 | 8167 | | |
8164 | 8168 | | |
8165 | 8169 | | |
| 8170 | + | |
| 8171 | + | |
| 8172 | + | |
| 8173 | + | |
8166 | 8174 | | |
8167 | 8175 | | |
8168 | 8176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
111 | 118 | | |
112 | 119 | | |
113 | 120 | | |
| |||
290 | 297 | | |
291 | 298 | | |
292 | 299 | | |
293 | | - | |
| 300 | + | |
| 301 | + | |
294 | 302 | | |
295 | 303 | | |
296 | 304 | | |
| |||
327 | 335 | | |
328 | 336 | | |
329 | 337 | | |
| 338 | + | |
330 | 339 | | |
331 | 340 | | |
332 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2473 | 2473 | | |
2474 | 2474 | | |
2475 | 2475 | | |
2476 | | - | |
| 2476 | + | |
2477 | 2477 | | |
2478 | 2478 | | |
2479 | 2479 | | |
2480 | 2480 | | |
2481 | 2481 | | |
2482 | 2482 | | |
2483 | | - | |
| 2483 | + | |
2484 | 2484 | | |
2485 | 2485 | | |
2486 | 2486 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1016 | 1016 | | |
1017 | 1017 | | |
1018 | 1018 | | |
| 1019 | + | |
1019 | 1020 | | |
1020 | 1021 | | |
1021 | 1022 | | |
| |||
0 commit comments