@porsche-design-system/components-react 4.7.0 → 4.8.0-rc.0

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.
Files changed (210) hide show
  1. package/CHANGELOG.md +85 -1
  2. package/cjs/hooks.cjs +1 -5
  3. package/cjs/lib/components/checkbox.wrapper.cjs +3 -3
  4. package/cjs/lib/components/input-date.wrapper.cjs +3 -3
  5. package/cjs/lib/components/input-email.wrapper.cjs +3 -3
  6. package/cjs/lib/components/input-month.wrapper.cjs +3 -3
  7. package/cjs/lib/components/input-number.wrapper.cjs +3 -3
  8. package/cjs/lib/components/input-password.wrapper.cjs +3 -3
  9. package/cjs/lib/components/input-tel.wrapper.cjs +3 -3
  10. package/cjs/lib/components/input-text.wrapper.cjs +3 -3
  11. package/cjs/lib/components/input-time.wrapper.cjs +3 -3
  12. package/cjs/lib/components/input-url.wrapper.cjs +3 -3
  13. package/cjs/lib/components/input-week.wrapper.cjs +3 -3
  14. package/cjs/lib/components/multi-select.wrapper.cjs +3 -3
  15. package/cjs/lib/components/select.wrapper.cjs +3 -3
  16. package/cjs/lib/components/switch.wrapper.cjs +3 -3
  17. package/cjs/lib/components/textarea.wrapper.cjs +3 -3
  18. package/esm/hooks.d.ts +0 -3
  19. package/esm/hooks.mjs +2 -5
  20. package/esm/lib/components/checkbox.wrapper.d.ts +9 -1
  21. package/esm/lib/components/checkbox.wrapper.mjs +3 -3
  22. package/esm/lib/components/input-date.wrapper.d.ts +9 -1
  23. package/esm/lib/components/input-date.wrapper.mjs +3 -3
  24. package/esm/lib/components/input-email.wrapper.d.ts +9 -1
  25. package/esm/lib/components/input-email.wrapper.mjs +3 -3
  26. package/esm/lib/components/input-month.wrapper.d.ts +9 -1
  27. package/esm/lib/components/input-month.wrapper.mjs +3 -3
  28. package/esm/lib/components/input-number.wrapper.d.ts +9 -1
  29. package/esm/lib/components/input-number.wrapper.mjs +3 -3
  30. package/esm/lib/components/input-password.wrapper.d.ts +9 -1
  31. package/esm/lib/components/input-password.wrapper.mjs +3 -3
  32. package/esm/lib/components/input-search.wrapper.d.ts +2 -2
  33. package/esm/lib/components/input-tel.wrapper.d.ts +9 -1
  34. package/esm/lib/components/input-tel.wrapper.mjs +3 -3
  35. package/esm/lib/components/input-text.wrapper.d.ts +9 -1
  36. package/esm/lib/components/input-text.wrapper.mjs +3 -3
  37. package/esm/lib/components/input-time.wrapper.d.ts +9 -1
  38. package/esm/lib/components/input-time.wrapper.mjs +3 -3
  39. package/esm/lib/components/input-url.wrapper.d.ts +9 -1
  40. package/esm/lib/components/input-url.wrapper.mjs +3 -3
  41. package/esm/lib/components/input-week.wrapper.d.ts +9 -1
  42. package/esm/lib/components/input-week.wrapper.mjs +3 -3
  43. package/esm/lib/components/link-pure.wrapper.d.ts +2 -2
  44. package/esm/lib/components/link-tile-product.wrapper.d.ts +2 -2
  45. package/esm/lib/components/link.wrapper.d.ts +2 -2
  46. package/esm/lib/components/multi-select.wrapper.d.ts +9 -1
  47. package/esm/lib/components/multi-select.wrapper.mjs +3 -3
  48. package/esm/lib/components/select.wrapper.d.ts +9 -1
  49. package/esm/lib/components/select.wrapper.mjs +3 -3
  50. package/esm/lib/components/switch.wrapper.d.ts +9 -1
  51. package/esm/lib/components/switch.wrapper.mjs +3 -3
  52. package/esm/lib/components/textarea.wrapper.d.ts +9 -1
  53. package/esm/lib/components/textarea.wrapper.mjs +3 -3
  54. package/esm/lib/types.d.ts +22 -1
  55. package/package.json +2 -2
  56. package/skills/pds-audit-deprecations-react/SKILL.md +2 -2
  57. package/skills/pds-knowledge-react/SKILL.md +3 -3
  58. package/skills/pds-knowledge-react/references/components/p-carousel/examples/DynamicSlides.tsx +1 -0
  59. package/skills/pds-knowledge-react/references/components/p-carousel/examples/FocusOnCenterSlide.tsx +1 -0
  60. package/skills/pds-knowledge-react/references/components/p-carousel/examples/JumpToSlide.tsx +1 -0
  61. package/skills/pds-knowledge-react/references/components/p-checkbox/accessibility.md +14 -0
  62. package/skills/pds-knowledge-react/references/components/p-checkbox/p-checkbox.md +12 -0
  63. package/skills/pds-knowledge-react/references/components/p-input-date/accessibility.md +14 -0
  64. package/skills/pds-knowledge-react/references/components/p-input-date/p-input-date.md +12 -0
  65. package/skills/pds-knowledge-react/references/components/p-input-email/accessibility.md +14 -0
  66. package/skills/pds-knowledge-react/references/components/p-input-email/p-input-email.md +12 -0
  67. package/skills/pds-knowledge-react/references/components/p-input-month/accessibility.md +14 -0
  68. package/skills/pds-knowledge-react/references/components/p-input-month/p-input-month.md +12 -0
  69. package/skills/pds-knowledge-react/references/components/p-input-number/accessibility.md +14 -0
  70. package/skills/pds-knowledge-react/references/components/p-input-number/p-input-number.md +12 -0
  71. package/skills/pds-knowledge-react/references/components/p-input-password/accessibility.md +14 -0
  72. package/skills/pds-knowledge-react/references/components/p-input-password/p-input-password.md +12 -0
  73. package/skills/pds-knowledge-react/references/components/p-input-search/p-input-search.md +2 -1
  74. package/skills/pds-knowledge-react/references/components/p-input-tel/accessibility.md +14 -0
  75. package/skills/pds-knowledge-react/references/components/p-input-tel/p-input-tel.md +12 -0
  76. package/skills/pds-knowledge-react/references/components/p-input-text/accessibility.md +14 -0
  77. package/skills/pds-knowledge-react/references/components/p-input-text/p-input-text.md +12 -0
  78. package/skills/pds-knowledge-react/references/components/p-input-time/accessibility.md +14 -0
  79. package/skills/pds-knowledge-react/references/components/p-input-time/p-input-time.md +12 -0
  80. package/skills/pds-knowledge-react/references/components/p-input-url/accessibility.md +14 -0
  81. package/skills/pds-knowledge-react/references/components/p-input-url/p-input-url.md +12 -0
  82. package/skills/pds-knowledge-react/references/components/p-input-week/accessibility.md +14 -0
  83. package/skills/pds-knowledge-react/references/components/p-input-week/p-input-week.md +12 -0
  84. package/skills/pds-knowledge-react/references/components/p-link/p-link.md +2 -2
  85. package/skills/pds-knowledge-react/references/components/p-link-pure/p-link-pure.md +2 -2
  86. package/skills/pds-knowledge-react/references/components/p-link-tile-product/p-link-tile-product.md +2 -2
  87. package/skills/pds-knowledge-react/references/components/p-multi-select/accessibility.md +22 -0
  88. package/skills/pds-knowledge-react/references/components/p-multi-select/p-multi-select.md +14 -2
  89. package/skills/pds-knowledge-react/references/components/p-pin-code/p-pin-code.md +11 -3
  90. package/skills/pds-knowledge-react/references/components/p-select/accessibility.md +22 -0
  91. package/skills/pds-knowledge-react/references/components/p-select/p-select.md +14 -2
  92. package/skills/pds-knowledge-react/references/components/p-switch/accessibility.md +18 -0
  93. package/skills/pds-knowledge-react/references/components/p-switch/p-switch.md +12 -0
  94. package/skills/pds-knowledge-react/references/components/p-textarea/accessibility.md +14 -0
  95. package/skills/pds-knowledge-react/references/components/p-textarea/p-textarea.md +12 -0
  96. package/skills/pds-knowledge-react/references/deprecations.md +4 -4
  97. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +18 -105
  98. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +78 -156
  99. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/hooks.cjs +1 -5
  100. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox.wrapper.cjs +4 -4
  101. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-date.wrapper.cjs +4 -4
  102. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-email.wrapper.cjs +4 -4
  103. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-month.wrapper.cjs +4 -4
  104. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-number.wrapper.cjs +4 -4
  105. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-password.wrapper.cjs +4 -4
  106. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-tel.wrapper.cjs +4 -4
  107. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-text.wrapper.cjs +4 -4
  108. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-time.wrapper.cjs +4 -4
  109. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-url.wrapper.cjs +4 -4
  110. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-week.wrapper.cjs +4 -4
  111. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/multi-select.wrapper.cjs +4 -4
  112. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/select.wrapper.cjs +4 -4
  113. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.cjs +4 -4
  114. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/textarea.wrapper.cjs +4 -4
  115. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +1 -1
  116. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.cjs +2 -2
  117. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs +1 -1
  118. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.cjs +1 -1
  119. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.cjs +1 -1
  120. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.cjs +1 -1
  121. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.cjs +1 -1
  122. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.cjs +1 -1
  123. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.cjs +1 -1
  124. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs +1 -1
  125. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.cjs +1 -1
  126. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.cjs +1 -1
  127. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.cjs +1 -1
  128. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.cjs +1 -1
  129. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-product.cjs +1 -1
  130. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.cjs +1 -1
  131. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +1 -1
  132. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +2 -3
  133. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.cjs +0 -1
  134. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +1 -1
  135. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.cjs +0 -1
  136. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.cjs +1 -2
  137. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +0 -1
  138. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.cjs +0 -1
  139. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.cjs +1 -1
  140. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +18 -105
  141. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +78 -150
  142. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/hooks.mjs +2 -5
  143. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox.wrapper.mjs +4 -4
  144. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-date.wrapper.mjs +4 -4
  145. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-email.wrapper.mjs +4 -4
  146. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-month.wrapper.mjs +4 -4
  147. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-number.wrapper.mjs +4 -4
  148. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-password.wrapper.mjs +4 -4
  149. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-tel.wrapper.mjs +4 -4
  150. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-text.wrapper.mjs +4 -4
  151. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-time.wrapper.mjs +4 -4
  152. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-url.wrapper.mjs +4 -4
  153. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-week.wrapper.mjs +4 -4
  154. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/multi-select.wrapper.mjs +4 -4
  155. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select.wrapper.mjs +4 -4
  156. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.mjs +4 -4
  157. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/textarea.wrapper.mjs +4 -4
  158. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +2 -2
  159. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.mjs +3 -3
  160. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs +1 -1
  161. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.mjs +1 -1
  162. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-month.mjs +1 -1
  163. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs +1 -1
  164. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +1 -1
  165. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.mjs +1 -1
  166. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs +1 -1
  167. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs +1 -1
  168. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.mjs +1 -1
  169. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-week.mjs +1 -1
  170. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.mjs +1 -1
  171. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.mjs +1 -1
  172. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-product.mjs +1 -1
  173. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.mjs +1 -1
  174. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +2 -2
  175. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +3 -4
  176. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.mjs +0 -1
  177. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +2 -2
  178. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.mjs +0 -1
  179. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.mjs +1 -2
  180. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +0 -1
  181. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.mjs +0 -1
  182. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.mjs +2 -2
  183. package/ssr/esm/hooks.d.ts +0 -3
  184. package/ssr/esm/lib/components/checkbox.wrapper.d.ts +9 -1
  185. package/ssr/esm/lib/components/input-date.wrapper.d.ts +9 -1
  186. package/ssr/esm/lib/components/input-email.wrapper.d.ts +9 -1
  187. package/ssr/esm/lib/components/input-month.wrapper.d.ts +9 -1
  188. package/ssr/esm/lib/components/input-number.wrapper.d.ts +9 -1
  189. package/ssr/esm/lib/components/input-password.wrapper.d.ts +9 -1
  190. package/ssr/esm/lib/components/input-search.wrapper.d.ts +2 -2
  191. package/ssr/esm/lib/components/input-tel.wrapper.d.ts +9 -1
  192. package/ssr/esm/lib/components/input-text.wrapper.d.ts +9 -1
  193. package/ssr/esm/lib/components/input-time.wrapper.d.ts +9 -1
  194. package/ssr/esm/lib/components/input-url.wrapper.d.ts +9 -1
  195. package/ssr/esm/lib/components/input-week.wrapper.d.ts +9 -1
  196. package/ssr/esm/lib/components/link-pure.wrapper.d.ts +2 -2
  197. package/ssr/esm/lib/components/link-tile-product.wrapper.d.ts +2 -2
  198. package/ssr/esm/lib/components/link.wrapper.d.ts +2 -2
  199. package/ssr/esm/lib/components/multi-select.wrapper.d.ts +9 -1
  200. package/ssr/esm/lib/components/select.wrapper.d.ts +9 -1
  201. package/ssr/esm/lib/components/switch.wrapper.d.ts +9 -1
  202. package/ssr/esm/lib/components/textarea.wrapper.d.ts +9 -1
  203. package/ssr/esm/lib/dsr-components/label.d.ts +1 -0
  204. package/ssr/esm/lib/dsr-components/link-pure.d.ts +1 -1
  205. package/ssr/esm/lib/dsr-components/link-tile-product.d.ts +1 -1
  206. package/ssr/esm/lib/dsr-components/link.d.ts +1 -1
  207. package/ssr/esm/lib/dsr-components/stepper-horizontal.d.ts +0 -1
  208. package/ssr/esm/lib/dsr-components/tabs-bar.d.ts +0 -1
  209. package/ssr/esm/lib/dsr-components/tabs.d.ts +0 -1
  210. package/ssr/esm/lib/types.d.ts +22 -1
@@ -1,11 +1,15 @@
1
1
  import type { BaseProps } from '../../BaseProps';
2
- import type { BreakpointCustomizable, SwitchAlignLabel, SwitchUpdateEventDetail } from '../types';
2
+ import type { BreakpointCustomizable, SwitchAlignLabel, SelectedAriaAttributes, SwitchAriaAttribute, SwitchUpdateEventDetail } from '../types';
3
3
  export type PSwitchProps = BaseProps & {
4
4
  /**
5
5
  * Sets the position of the slotted label relative to the switch toggle, either before (`start`) or after (`end`) it. Supports responsive breakpoint values.
6
6
  * @default 'end'
7
7
  */
8
8
  alignLabel?: BreakpointCustomizable<SwitchAlignLabel>;
9
+ /**
10
+ * Sets additional ARIA attributes on the switch to improve accessibility for screen readers.
11
+ */
12
+ aria?: SelectedAriaAttributes<SwitchAriaAttribute>;
9
13
  /**
10
14
  * Reflects the switch's current on/off state and allows setting the initial checked value when the component first renders.
11
15
  * @default false
@@ -47,6 +51,10 @@ export declare const PSwitch: import("react").ForwardRefExoticComponent<Omit<imp
47
51
  * @default 'end'
48
52
  */
49
53
  alignLabel?: BreakpointCustomizable<SwitchAlignLabel>;
54
+ /**
55
+ * Sets additional ARIA attributes on the switch to improve accessibility for screen readers.
56
+ */
57
+ aria?: SelectedAriaAttributes<SwitchAriaAttribute>;
50
58
  /**
51
59
  * Reflects the switch's current on/off state and allows setting the initial checked value when the component first renders.
52
60
  * @default false
@@ -4,14 +4,14 @@ import { forwardRef, useRef } from 'react';
4
4
  import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
5
5
  import { syncRef } from '../../utils.mjs';
6
6
 
7
- const PSwitch = /*#__PURE__*/ forwardRef(({ alignLabel = 'end', checked = false, compact = false, disabled = false, hideLabel = false, loading = false, onUpdate, stretch = false, className, ...rest }, ref) => {
7
+ const PSwitch = /*#__PURE__*/ forwardRef(({ alignLabel = 'end', aria, checked = false, compact = false, disabled = false, hideLabel = false, loading = false, onUpdate, stretch = false, className, ...rest }, ref) => {
8
8
  const elementRef = useRef(undefined);
9
9
  useEventCallback(elementRef, 'update', onUpdate);
10
10
  const WebComponentTag = usePrefix('p-switch');
11
- const propsToSync = [alignLabel, checked, compact, disabled, hideLabel, loading, stretch];
11
+ const propsToSync = [alignLabel, aria, checked, compact, disabled, hideLabel, loading, stretch];
12
12
  useBrowserLayoutEffect(() => {
13
13
  const { current } = elementRef;
14
- ['alignLabel', 'checked', 'compact', 'disabled', 'hideLabel', 'loading', 'stretch'].forEach((propName, i) => (current[propName] = propsToSync[i]));
14
+ ['alignLabel', 'aria', 'checked', 'compact', 'disabled', 'hideLabel', 'loading', 'stretch'].forEach((propName, i) => (current[propName] = propsToSync[i]));
15
15
  }, propsToSync);
16
16
  const props = {
17
17
  ...rest,
@@ -1,6 +1,10 @@
1
1
  import type { BaseProps } from '../../BaseProps';
2
- import type { BreakpointCustomizable, TextareaBlurEventDetail, TextareaChangeEventDetail, TextareaInputEventDetail, TextareaResize, TextareaState, TextareaWrap } from '../types';
2
+ import type { SelectedAriaAttributes, TextareaAriaAttribute, BreakpointCustomizable, TextareaBlurEventDetail, TextareaChangeEventDetail, TextareaInputEventDetail, TextareaResize, TextareaState, TextareaWrap } from '../types';
3
3
  export type PTextareaProps = BaseProps & {
4
+ /**
5
+ * Sets additional ARIA attributes on the native textarea to improve accessibility for screen readers.
6
+ */
7
+ aria?: SelectedAriaAttributes<TextareaAriaAttribute>;
4
8
  /**
5
9
  * Provides the browser with a hint to enable text autofill suggestions for the textarea (e.g. `autocomplete='on'`).
6
10
  */
@@ -114,6 +118,10 @@ export type PTextareaProps = BaseProps & {
114
118
  wrap?: TextareaWrap;
115
119
  };
116
120
  export declare const PTextarea: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
121
+ /**
122
+ * Sets additional ARIA attributes on the native textarea to improve accessibility for screen readers.
123
+ */
124
+ aria?: SelectedAriaAttributes<TextareaAriaAttribute>;
117
125
  /**
118
126
  * Provides the browser with a hint to enable text autofill suggestions for the textarea (e.g. `autocomplete='on'`).
119
127
  */
@@ -4,16 +4,16 @@ import { forwardRef, useRef } from 'react';
4
4
  import { useEventCallback, usePrefix, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
5
5
  import { syncRef } from '../../utils.mjs';
6
6
 
7
- const PTextarea = /*#__PURE__*/ forwardRef(({ autoComplete, compact = false, counter = false, description = '', disabled = false, form, hideLabel = false, label = '', maxLength, message = '', minLength, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, resize = 'vertical', rows = 7, spellCheck, state = 'none', value = '', wrap = 'soft', className, ...rest }, ref) => {
7
+ const PTextarea = /*#__PURE__*/ forwardRef(({ aria, autoComplete, compact = false, counter = false, description = '', disabled = false, form, hideLabel = false, label = '', maxLength, message = '', minLength, name, onBlur, onChange, onInput, placeholder = '', readOnly = false, required = false, resize = 'vertical', rows = 7, spellCheck, state = 'none', value = '', wrap = 'soft', className, ...rest }, ref) => {
8
8
  const elementRef = useRef(undefined);
9
9
  useEventCallback(elementRef, 'blur', onBlur);
10
10
  useEventCallback(elementRef, 'change', onChange);
11
11
  useEventCallback(elementRef, 'input', onInput);
12
12
  const WebComponentTag = usePrefix('p-textarea');
13
- const propsToSync = [autoComplete, compact, counter, description, disabled, form, hideLabel, label, maxLength, message, minLength, name, placeholder, readOnly, required, resize, rows, spellCheck, state, value, wrap];
13
+ const propsToSync = [aria, autoComplete, compact, counter, description, disabled, form, hideLabel, label, maxLength, message, minLength, name, placeholder, readOnly, required, resize, rows, spellCheck, state, value, wrap];
14
14
  useBrowserLayoutEffect(() => {
15
15
  const { current } = elementRef;
16
- ['autoComplete', 'compact', 'counter', 'description', 'disabled', 'form', 'hideLabel', 'label', 'maxLength', 'message', 'minLength', 'name', 'placeholder', 'readOnly', 'required', 'resize', 'rows', 'spellCheck', 'state', 'value', 'wrap'].forEach((propName, i) => (current[propName] = propsToSync[i]));
16
+ ['aria', 'autoComplete', 'compact', 'counter', 'description', 'disabled', 'form', 'hideLabel', 'label', 'maxLength', 'message', 'minLength', 'name', 'placeholder', 'readOnly', 'required', 'resize', 'rows', 'spellCheck', 'state', 'value', 'wrap'].forEach((propName, i) => (current[propName] = propsToSync[i]));
17
17
  }, propsToSync);
18
18
  const props = {
19
19
  ...rest,
@@ -675,6 +675,11 @@ declare const BUTTON_ARIA_ATTRIBUTES: readonly [
675
675
  "aria-haspopup"
676
676
  ];
677
677
  export type ButtonAriaAttribute = (typeof BUTTON_ARIA_ATTRIBUTES)[number];
678
+ declare const FORM_FIELD_ARIA_ATTRIBUTES: readonly [
679
+ "aria-label",
680
+ "aria-description"
681
+ ];
682
+ export type FormFieldAriaAttribute = (typeof FORM_FIELD_ARIA_ATTRIBUTES)[number];
678
683
  declare const LINK_ARIA_ATTRIBUTES: readonly [
679
684
  "aria-label",
680
685
  "aria-description",
@@ -735,6 +740,7 @@ declare const TILE_ALIGNS: readonly [
735
740
  ];
736
741
  export type TileAlign = (typeof TILE_ALIGNS)[number];
737
742
  export type MultiSelectState = FormState;
743
+ export type MultiSelectAriaAttribute = FormFieldAriaAttribute;
738
744
  export type MultiSelectDropdownDirection = SelectComponentsDropdownDirection;
739
745
  export type MultiSelectChangeEventDetail = {
740
746
  name: string;
@@ -744,6 +750,7 @@ export type MultiSelectToggleEventDetail = {
744
750
  open: boolean;
745
751
  };
746
752
  export type SelectState = FormState;
753
+ export type SelectAriaAttribute = FormFieldAriaAttribute;
747
754
  export type SelectDropdownDirection = SelectComponentsDropdownDirection;
748
755
  export type SelectChangeEventDetail = {
749
756
  name: string;
@@ -1082,6 +1089,7 @@ declare const CAROUSEL_ALIGN_CONTROLS: readonly [
1082
1089
  ];
1083
1090
  export type CarouselAlignControls = (typeof CAROUSEL_ALIGN_CONTROLS)[number];
1084
1091
  export type CheckboxState = FormState;
1092
+ export type CheckboxAriaAttribute = FormFieldAriaAttribute;
1085
1093
  export type CheckboxBlurEventDetail = Event;
1086
1094
  export type CheckboxChangeEventDetail = Event;
1087
1095
  export type CrestTarget = LinkTarget;
@@ -1310,22 +1318,27 @@ declare const INLINE_NOTIFICATION_HEADING_TAGS: readonly [
1310
1318
  ];
1311
1319
  export type InlineNotificationHeadingTag = (typeof INLINE_NOTIFICATION_HEADING_TAGS)[number];
1312
1320
  export type InputDateState = FormState;
1321
+ export type InputDateAriaAttribute = FormFieldAriaAttribute;
1313
1322
  export type InputDateChangeEventDetail = Event;
1314
1323
  export type InputDateBlurEventDetail = Event;
1315
1324
  export type InputDateInputEventDetail = InputEvent;
1316
1325
  export type InputEmailState = FormState;
1326
+ export type InputEmailAriaAttribute = FormFieldAriaAttribute;
1317
1327
  export type InputEmailChangeEventDetail = Event;
1318
1328
  export type InputEmailBlurEventDetail = Event;
1319
1329
  export type InputEmailInputEventDetail = InputEvent;
1320
1330
  export type InputMonthState = FormState;
1331
+ export type InputMonthAriaAttribute = FormFieldAriaAttribute;
1321
1332
  export type InputMonthChangeEventDetail = Event;
1322
1333
  export type InputMonthBlurEventDetail = Event;
1323
1334
  export type InputMonthInputEventDetail = InputEvent;
1324
1335
  export type InputNumberState = FormState;
1336
+ export type InputNumberAriaAttribute = FormFieldAriaAttribute;
1325
1337
  export type InputNumberChangeEventDetail = Event;
1326
1338
  export type InputNumberBlurEventDetail = Event;
1327
1339
  export type InputNumberInputEventDetail = InputEvent;
1328
1340
  export type InputPasswordState = FormState;
1341
+ export type InputPasswordAriaAttribute = FormFieldAriaAttribute;
1329
1342
  export type InputPasswordChangeEventDetail = Event;
1330
1343
  export type InputPasswordBlurEventDetail = Event;
1331
1344
  export type InputPasswordInputEventDetail = InputEvent;
@@ -1339,26 +1352,32 @@ declare const INPUT_SEARCH_ARIA_ATTRIBUTES: readonly [
1339
1352
  "aria-controls",
1340
1353
  "aria-expanded",
1341
1354
  "aria-haspopup",
1342
- "aria-label"
1355
+ "aria-label",
1356
+ "aria-description"
1343
1357
  ];
1344
1358
  export type InputSearchAriaAttribute = (typeof INPUT_SEARCH_ARIA_ATTRIBUTES)[number];
1345
1359
  export type InputTelState = FormState;
1360
+ export type InputTelAriaAttribute = FormFieldAriaAttribute;
1346
1361
  export type InputTelChangeEventDetail = Event;
1347
1362
  export type InputTelBlurEventDetail = Event;
1348
1363
  export type InputTelInputEventDetail = InputEvent;
1349
1364
  export type InputTextState = FormState;
1365
+ export type InputTextAriaAttribute = FormFieldAriaAttribute;
1350
1366
  export type InputTextChangeEventDetail = Event;
1351
1367
  export type InputTextBlurEventDetail = Event;
1352
1368
  export type InputTextInputEventDetail = InputEvent;
1353
1369
  export type InputTimeState = FormState;
1370
+ export type InputTimeAriaAttribute = FormFieldAriaAttribute;
1354
1371
  export type InputTimeChangeEventDetail = Event;
1355
1372
  export type InputTimeBlurEventDetail = Event;
1356
1373
  export type InputTimeInputEventDetail = InputEvent;
1357
1374
  export type InputUrlState = FormState;
1375
+ export type InputUrlAriaAttribute = FormFieldAriaAttribute;
1358
1376
  export type InputUrlChangeEventDetail = Event;
1359
1377
  export type InputUrlBlurEventDetail = Event;
1360
1378
  export type InputUrlInputEventDetail = InputEvent;
1361
1379
  export type InputWeekState = FormState;
1380
+ export type InputWeekAriaAttribute = FormFieldAriaAttribute;
1362
1381
  export type InputWeekChangeEventDetail = Event;
1363
1382
  export type InputWeekBlurEventDetail = Event;
1364
1383
  export type InputWeekInputEventDetail = InputEvent;
@@ -1644,6 +1663,7 @@ declare const STEPPER_ITEM_STATES: readonly [
1644
1663
  ];
1645
1664
  export type StepperHorizontalItemState = (typeof STEPPER_ITEM_STATES)[number];
1646
1665
  export type SwitchAlignLabel = AlignLabel;
1666
+ export type SwitchAriaAttribute = FormFieldAriaAttribute;
1647
1667
  export type SwitchUpdateEventDetail = {
1648
1668
  checked: boolean;
1649
1669
  };
@@ -1802,6 +1822,7 @@ declare const TEXT_LIST_TYPES: readonly [
1802
1822
  ];
1803
1823
  export type TextListType = (typeof TEXT_LIST_TYPES)[number];
1804
1824
  export type TextareaState = FormState;
1825
+ export type TextareaAriaAttribute = FormFieldAriaAttribute;
1805
1826
  declare const TEXTAREA_WRAPS: readonly [
1806
1827
  "hard",
1807
1828
  "soft",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@porsche-design-system/components-react",
3
- "version": "4.7.0",
3
+ "version": "4.8.0-rc.0",
4
4
  "description": "Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.",
5
5
  "keywords": [
6
6
  "porsche",
@@ -21,7 +21,7 @@
21
21
  "url": "https://github.com/porsche-design-system/porsche-design-system"
22
22
  },
23
23
  "dependencies": {
24
- "@porsche-design-system/components-js": "4.7.0"
24
+ "@porsche-design-system/components-js": "4.8.0-rc.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "ag-grid-community": ">= 36.0.0 <37.0.0",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: pds-audit-deprecations-react
3
3
  description: Audit an existing react project for deprecated Porsche Design System (PDS) API usage — components, props, prop values, events, slots, CSS variables, tokens and styling-package aliases. Produces a JSON report and a Markdown report rendered from it, every finding carrying quoted evidence, a concrete fix and a derived confidence. Read-only apart from its two report files.
4
- compatibility: Requires the pds-knowledge-react skill, which ships alongside this one in @porsche-design-system/components-react@4.7.0. The audited project must depend on that exact version.
4
+ compatibility: Requires the pds-knowledge-react skill, which ships alongside this one in @porsche-design-system/components-react@4.8.0-rc.0. The audited project must depend on that exact version.
5
5
  disable-model-invocation: true
6
6
  ---
7
7
 
@@ -135,7 +135,7 @@ Every finding carries:
135
135
  - `evidence` — every location where the project **uses** the API, each with a project-relative path, a line number and the source line **quoted verbatim**. The quote is not decoration: it is what lets a reader, or a later fix, confirm the finding against the file instead of trusting it.
136
136
  - `anchor` on a location — the line that proves that usage is PDS, with its own path, line and quoted source. The import, the resolved SCSS `@use` **including one injected by build config**, the Tailwind `@theme` import, or the PDS root at the far end of a wrapper chain. Record it whenever it is not the evidence line itself; it is frequently in another file, and it is the only truthful place to put `vite.config.ts` for a stylesheet that names PDS nowhere. Omit it only where the usage anchors itself, as a `--p-` custom property does.
137
137
  - `remediation` — a `replacement` with the exact `from` and `to` spelling whenever the index documents an unambiguous one, plus an `instruction` in words. Where the index documents no replacement, say so plainly in the instruction rather than inventing one.
138
- - `sources` — the knowledge-skill reference the fact came from, as a path relative to that skill’s root, at version `4.7.0`.
138
+ - `sources` — the knowledge-skill reference the fact came from, as a path relative to that skill’s root, at version `4.8.0-rc.0`.
139
139
  - the index entry’s message as `deprecationMessage`, verbatim, when it has one. Some say an API has no effect anymore; that wording matters to whoever reads the finding, so do not paraphrase it.
140
140
 
141
141
  An evidence `line` is the **usage** — the attribute, tag, custom property or alias reference itself. Never the `import`, `@use` or `@theme` that anchored it, never the wrapper call it arrived through, and never the declaration line of a constant it resolved from — including a key inside an object that is applied to the element as a whole, which is such a declaration and not a usage. For such an object, the evidence line is the element it is applied to. Where a component is reached through a local binding, the evidence line is the reference to the PDS binding, not the render of the local alias. Those lines are real and they matter, which is exactly why the anchor has a field of its own: counted as locations instead, they inflate a finding by however many anchors it happens to have, and occurrence count is a sort key in §8 — so two runs of an unchanged project stop being comparable.
@@ -15,11 +15,11 @@ Prefer Porsche Design System components and tokens for new UI, even when the use
15
15
 
16
16
  This skill currently covers components, global stylesheets and theming, tokens, styling integrations, and the deprecated API index. It does not yet include complete getting-started, setup, and installation guidance; the v3-to-v4 migration guide; the changelog; partials; patterns and templates; the AG Grid theme; or the Storefront’s Must Know and Help sections.
17
17
 
18
- Before using documentation outside this skill or the installed package, match it to the installed PDS version. This skill was generated for `4.7.0`; prefer the [exact-version Porsche Design System Storefront](https://designsystem.porsche.com/v4.7.0/). Major-version URLs such as `/v4/` always serve the latest v4 release and may describe APIs or setup introduced after the installed version. Use them only as a fallback and verify relevant details against the installed package.
18
+ Before using documentation outside this skill or the installed package, match it to the installed PDS version. This skill was generated for `4.8.0-rc.0`; prefer the [exact-version Porsche Design System Storefront](https://designsystem.porsche.com/v4.8.0-rc.0/). Major-version URLs such as `/v4/` always serve the latest v4 release and may describe APIs or setup introduced after the installed version. Use them only as a fallback and verify relevant details against the installed package.
19
19
 
20
20
  For runnable patterns and templates, consult the [Porsche Design System examples repository](https://github.com/porsche-design-system/examples), selecting a release tag or commit that matches the installed package instead of assuming its default branch is compatible. For release-specific changes, read `../../CHANGELOG.md`.
21
21
 
22
- For exact API facts, inspect the installed typings and metadata first. When readable implementation details are necessary, use the [exact-version component source](https://github.com/porsche-design-system/porsche-design-system/tree/v4.7.0/packages/components/src/components) under the repository's `packages/components/src/components/<component>` directory. Do not use the default branch, which may represent a newer release.
22
+ For exact API facts, inspect the installed typings and metadata first. When readable implementation details are necessary, use the [exact-version component source](https://github.com/porsche-design-system/porsche-design-system/tree/v4.8.0-rc.0/packages/components/src/components) under the repository's `packages/components/src/components/<component>` directory. Do not use the default branch, which may represent a newer release.
23
23
 
24
24
  For deployed browser behavior, inspect component requests in the Network panel. Treat these minified, content-hashed CDN artifacts as a debugging fallback; use the exact-version repository source for readable implementation details.
25
25
 
@@ -110,7 +110,7 @@ import { PButton, PorscheDesignSystemProvider } from '@porsche-design-system/com
110
110
 
111
111
  On the server, the `/ssr` build emits component markup and styles as Declarative Shadow DOM so the browser can create the Shadow DOM before JavaScript runs. In the browser, it initializes like the standard React wrapper. The framework build must replace `process.browser` for its server and client targets and eliminate the unused branch.
112
112
 
113
- Framework setup differs. Follow the [Next.js integration guide](https://designsystem.porsche.com/v4.7.0/developing/next-js/getting-started/) or the [React Router integration guide](https://designsystem.porsche.com/v4.7.0/developing/react-router/getting-started/). Remix users should follow the React Router guidance because Remix v2 was upstreamed into React Router.
113
+ Framework setup differs. Follow the [Next.js integration guide](https://designsystem.porsche.com/v4.8.0-rc.0/developing/next-js/getting-started/) or the [React Router integration guide](https://designsystem.porsche.com/v4.8.0-rc.0/developing/react-router/getting-started/). Remix users should follow the React Router guidance because Remix v2 was upstreamed into React Router.
114
114
 
115
115
  ## Stylesheets
116
116
 
@@ -12,6 +12,7 @@ export const Example = () => {
12
12
  alignItems: 'center',
13
13
  justifyContent: 'center',
14
14
  background: '#00b0f4',
15
+ color: '#000',
15
16
  height: '150px',
16
17
  };
17
18
 
@@ -11,6 +11,7 @@ export const Example = () => {
11
11
  alignItems: 'center',
12
12
  justifyContent: 'center',
13
13
  background: '#00b0f4',
14
+ color: '#000',
14
15
  height: '150px',
15
16
  transition: 'background 0.3s ease',
16
17
  },
@@ -19,6 +19,7 @@ export const Example = () => {
19
19
  alignItems: 'center',
20
20
  justifyContent: 'center',
21
21
  background: '#00b0f4',
22
+ color: '#000',
22
23
  height: '150px',
23
24
  };
24
25
 
@@ -2,6 +2,20 @@
2
2
 
3
3
  ## Integration examples
4
4
 
5
+ ### ARIA on component host vs aria prop
6
+
7
+ #### ❌ Anti-pattern
8
+
9
+ ```tsx
10
+ <PCheckbox name="terms" label="I accept the terms" aria-label="Accessible name" aria-description="Additional context"></PCheckbox>
11
+ ```
12
+
13
+ #### ✅ Recommended
14
+
15
+ ```tsx
16
+ <PCheckbox name="terms" label="I accept the terms" aria={{'aria-label': 'Accessible name', 'aria-description': 'Additional context'}}></PCheckbox>
17
+ ```
18
+
5
19
  ### Hidden label without accessible name
6
20
 
7
21
  #### ❌ Anti-pattern
@@ -45,6 +45,15 @@ A `label` is a caption which informs the user what information a particular form
45
45
 
46
46
  ### ARIA enhancements
47
47
 
48
+ #### External **ARIA** provided by the `aria` property:
49
+
50
+ Use the `aria` property to pass supported attributes to the **native control inside the shadow DOM**. Prefer a visible `label` for the accessible name. Use `aria-label` when the label is hidden or insufficient, and `aria-description` for extra context that should not replace the name.
51
+
52
+ | ARIA | Usage |
53
+ | --- | --- |
54
+ | `aria-label` | Defines an accessible name when the visible label is insufficient or hidden; prefer a visible `label` for most cases. |
55
+ | `aria-description` | Provides additional context for assistive technologies without replacing the accessible name. |
56
+
48
57
  #### Internal **ARIA** that is managed by the component:
49
58
 
50
59
  | ARIA | Usage |
@@ -62,10 +71,12 @@ In general, avoid using the `disabled` state. Disabled elements are no longer fo
62
71
 
63
72
  ### Common do's and don'ts
64
73
 
74
+ - **Do** pass extra labelling through the `aria` prop (`aria-label`, `aria-description`).
65
75
  - **Do** provide a clear `label` that describes what the checkbox controls.
66
76
  - **Do** use the component state/message API so validation and status changes are announced.
67
77
  - **Do** use clear error wording that helps users recover.
68
78
  - **Don't** use `hide-label` without an accessible name.
79
+ - **Don't** add native `aria-*` attributes directly on the component host.
69
80
  - **Don't** use `hide-label` when it is not clear what the checkbox controls.
70
81
 
71
82
  ## Integration examples
@@ -78,6 +89,7 @@ See [accessibility integration examples](./accessibility.md) for paired anti-pat
78
89
 
79
90
  | Property | Type | Default | Description |
80
91
  | --- | --- | --- | --- |
92
+ | `aria` | `CheckboxAriaAttribute` | `undefined` | Sets additional ARIA attributes on the native checkbox to improve accessibility for screen readers. |
81
93
  | `checked` | `boolean` | `false` | Reflects the checkbox's current checked state and allows setting the initial checked value on load. |
82
94
  | `compact` | `boolean` | `false` | Reduces the checkbox size and spacing for a more compact layout. |
83
95
  | `disabled` | `boolean` | `false` | Disables the checkbox, preventing all interaction. The value is not submitted with the form. |
@@ -2,6 +2,20 @@
2
2
 
3
3
  ## Integration examples
4
4
 
5
+ ### ARIA on component host vs aria prop
6
+
7
+ #### ❌ Anti-pattern
8
+
9
+ ```tsx
10
+ <PInputDate name="date" label="Date of birth" aria-label="Accessible name" aria-description="Additional context"></PInputDate>
11
+ ```
12
+
13
+ #### ✅ Recommended
14
+
15
+ ```tsx
16
+ <PInputDate name="date" label="Date of birth" aria={{'aria-label': 'Accessible name', 'aria-description': 'Additional context'}}></PInputDate>
17
+ ```
18
+
5
19
  ### Placeholder used as the only label
6
20
 
7
21
  #### ❌ Anti-pattern
@@ -50,6 +50,15 @@ A `label` is a caption which informs the user what information a particular form
50
50
 
51
51
  ### ARIA enhancements
52
52
 
53
+ #### External **ARIA** provided by the `aria` property:
54
+
55
+ Use the `aria` property to pass supported attributes to the **native control inside the shadow DOM**. Prefer a visible `label` for the accessible name. Use `aria-label` when the label is hidden or insufficient, and `aria-description` for extra context that should not replace the name.
56
+
57
+ | ARIA | Usage |
58
+ | --- | --- |
59
+ | `aria-label` | Defines an accessible name when the visible label is insufficient or hidden; prefer a visible `label` for most cases. |
60
+ | `aria-description` | Provides additional context for assistive technologies without replacing the accessible name. |
61
+
53
62
  #### Internal **ARIA** that is managed by the component:
54
63
 
55
64
  | ARIA | Usage |
@@ -68,11 +77,13 @@ In general, avoid using the `disabled` state. Disabled elements are no longer fo
68
77
 
69
78
  ### Common do's and don'ts
70
79
 
80
+ - **Do** pass extra labelling through the `aria` prop (`aria-label`, `aria-description`).
71
81
  - **Do** keep a persistent label and use helper/description text when additional context is required.
72
82
  - **Do** use the component state/message API so validation and status changes are announced.
73
83
  - **Do** use clear error wording that helps users recover.
74
84
  - **Don't** rely on placeholder text as the only label.
75
85
  - **Don't** use `hide-label` without an accessible name.
86
+ - **Don't** add native `aria-*` attributes directly on the component host.
76
87
 
77
88
  ## Limitations
78
89
 
@@ -93,6 +104,7 @@ See [accessibility integration examples](./accessibility.md) for paired anti-pat
93
104
 
94
105
  | Property | Type | Default | Description |
95
106
  | --- | --- | --- | --- |
107
+ | `aria` | `InputDateAriaAttribute` | `undefined` | Sets additional ARIA attributes on the native input to improve accessibility for screen readers. |
96
108
  | `autoComplete` | `string` | `undefined` | Provides the browser with a date autofill hint (e.g. `autocomplete='bday'` for a birthday field). |
97
109
  | `compact` | `boolean` | `false` | Reduces the input height and padding for a more compact layout. |
98
110
  | `description` | `string` | `''` | Sets a supplementary description displayed below the label to provide additional context. |
@@ -2,6 +2,20 @@
2
2
 
3
3
  ## Integration examples
4
4
 
5
+ ### ARIA on component host vs aria prop
6
+
7
+ #### ❌ Anti-pattern
8
+
9
+ ```tsx
10
+ <PInputEmail name="email" label="Email address" aria-label="Accessible name" aria-description="Additional context"></PInputEmail>
11
+ ```
12
+
13
+ #### ✅ Recommended
14
+
15
+ ```tsx
16
+ <PInputEmail name="email" label="Email address" aria={{'aria-label': 'Accessible name', 'aria-description': 'Additional context'}}></PInputEmail>
17
+ ```
18
+
5
19
  ### Placeholder used as the only label
6
20
 
7
21
  #### ❌ Anti-pattern
@@ -51,6 +51,15 @@ While a `placeholder` is optional but recommended to be set whenever bits of exa
51
51
 
52
52
  ### ARIA enhancements
53
53
 
54
+ #### External **ARIA** provided by the `aria` property:
55
+
56
+ Use the `aria` property to pass supported attributes to the **native control inside the shadow DOM**. Prefer a visible `label` for the accessible name. Use `aria-label` when the label is hidden or insufficient, and `aria-description` for extra context that should not replace the name.
57
+
58
+ | ARIA | Usage |
59
+ | --- | --- |
60
+ | `aria-label` | Defines an accessible name when the visible label is insufficient or hidden; prefer a visible `label` for most cases. |
61
+ | `aria-description` | Provides additional context for assistive technologies without replacing the accessible name. |
62
+
54
63
  #### Internal **ARIA** that is managed by the component:
55
64
 
56
65
  | ARIA | Usage |
@@ -69,11 +78,13 @@ In general, avoid using the `disabled` state. Disabled elements are no longer fo
69
78
 
70
79
  ### Common do's and don'ts
71
80
 
81
+ - **Do** pass extra labelling through the `aria` prop (`aria-label`, `aria-description`).
72
82
  - **Do** keep a persistent label and use helper/description text when additional context is required.
73
83
  - **Do** use the component state/message API so validation and status changes are announced.
74
84
  - **Do** use clear error wording that helps users recover.
75
85
  - **Don't** rely on placeholder text as the only label.
76
86
  - **Don't** use `hide-label` without an accessible name.
87
+ - **Don't** add native `aria-*` attributes directly on the component host.
77
88
 
78
89
  ## Limitations
79
90
 
@@ -94,6 +105,7 @@ See [accessibility integration examples](./accessibility.md) for paired anti-pat
94
105
 
95
106
  | Property | Type | Default | Description |
96
107
  | --- | --- | --- | --- |
108
+ | `aria` | `InputEmailAriaAttribute` | `undefined` | Sets additional ARIA attributes on the native input to improve accessibility for screen readers. |
97
109
  | `autoComplete` | `string` | `undefined` | Provides the browser with a data type hint to enable relevant autofill suggestions (e.g. `autocomplete='email'`). |
98
110
  | `compact` | `boolean` | `false` | Reduces the input height and padding for a more compact layout. |
99
111
  | `description` | `string` | `''` | Sets a supplementary description displayed below the label to provide additional context. |
@@ -2,6 +2,20 @@
2
2
 
3
3
  ## Integration examples
4
4
 
5
+ ### ARIA on component host vs aria prop
6
+
7
+ #### ❌ Anti-pattern
8
+
9
+ ```tsx
10
+ <PInputMonth name="month" label="Start month" aria-label="Accessible name" aria-description="Additional context"></PInputMonth>
11
+ ```
12
+
13
+ #### ✅ Recommended
14
+
15
+ ```tsx
16
+ <PInputMonth name="month" label="Start month" aria={{'aria-label': 'Accessible name', 'aria-description': 'Additional context'}}></PInputMonth>
17
+ ```
18
+
5
19
  ### Placeholder used as the only label
6
20
 
7
21
  #### ❌ Anti-pattern
@@ -50,6 +50,15 @@ A `label` is a caption which informs the user what information a particular form
50
50
 
51
51
  ### ARIA enhancements
52
52
 
53
+ #### External **ARIA** provided by the `aria` property:
54
+
55
+ Use the `aria` property to pass supported attributes to the **native control inside the shadow DOM**. Prefer a visible `label` for the accessible name. Use `aria-label` when the label is hidden or insufficient, and `aria-description` for extra context that should not replace the name.
56
+
57
+ | ARIA | Usage |
58
+ | --- | --- |
59
+ | `aria-label` | Defines an accessible name when the visible label is insufficient or hidden; prefer a visible `label` for most cases. |
60
+ | `aria-description` | Provides additional context for assistive technologies without replacing the accessible name. |
61
+
53
62
  #### Internal **ARIA** that is managed by the component:
54
63
 
55
64
  | ARIA | Usage |
@@ -68,11 +77,13 @@ In general, avoid using the `disabled` state. Disabled elements are no longer fo
68
77
 
69
78
  ### Common do's and don'ts
70
79
 
80
+ - **Do** pass extra labelling through the `aria` prop (`aria-label`, `aria-description`).
71
81
  - **Do** keep a persistent label and use helper/description text when additional context is required.
72
82
  - **Do** use the component state/message API so validation and status changes are announced.
73
83
  - **Do** use clear error wording that helps users recover.
74
84
  - **Don't** rely on placeholder text as the only label.
75
85
  - **Don't** use `hide-label` without an accessible name.
86
+ - **Don't** add native `aria-*` attributes directly on the component host.
76
87
 
77
88
  ## Limitations
78
89
 
@@ -93,6 +104,7 @@ See [accessibility integration examples](./accessibility.md) for paired anti-pat
93
104
 
94
105
  | Property | Type | Default | Description |
95
106
  | --- | --- | --- | --- |
107
+ | `aria` | `InputMonthAriaAttribute` | `undefined` | Sets additional ARIA attributes on the native input to improve accessibility for screen readers. |
96
108
  | `autoComplete` | `string` | `undefined` | Provides the browser with a month/year autofill hint. |
97
109
  | `compact` | `boolean` | `false` | Reduces the input height and padding for a more compact layout. |
98
110
  | `description` | `string` | `''` | Sets a supplementary description displayed below the label to provide additional context. |
@@ -2,6 +2,20 @@
2
2
 
3
3
  ## Integration examples
4
4
 
5
+ ### ARIA on component host vs aria prop
6
+
7
+ #### ❌ Anti-pattern
8
+
9
+ ```tsx
10
+ <PInputNumber name="quantity" label="Quantity" aria-label="Accessible name" aria-description="Additional context"></PInputNumber>
11
+ ```
12
+
13
+ #### ✅ Recommended
14
+
15
+ ```tsx
16
+ <PInputNumber name="quantity" label="Quantity" aria={{'aria-label': 'Accessible name', 'aria-description': 'Additional context'}}></PInputNumber>
17
+ ```
18
+
5
19
  ### Placeholder used as the only label
6
20
 
7
21
  #### ❌ Anti-pattern
@@ -52,6 +52,15 @@ While a `placeholder` is optional but recommended to be set whenever bits of exa
52
52
 
53
53
  ### ARIA enhancements
54
54
 
55
+ #### External **ARIA** provided by the `aria` property:
56
+
57
+ Use the `aria` property to pass supported attributes to the **native control inside the shadow DOM**. Prefer a visible `label` for the accessible name. Use `aria-label` when the label is hidden or insufficient, and `aria-description` for extra context that should not replace the name.
58
+
59
+ | ARIA | Usage |
60
+ | --- | --- |
61
+ | `aria-label` | Defines an accessible name when the visible label is insufficient or hidden; prefer a visible `label` for most cases. |
62
+ | `aria-description` | Provides additional context for assistive technologies without replacing the accessible name. |
63
+
55
64
  #### Internal **ARIA** that is managed by the component:
56
65
 
57
66
  | ARIA | Usage |
@@ -74,11 +83,13 @@ In general, avoid using the `disabled` state. Disabled elements are no longer fo
74
83
 
75
84
  ### Common do's and don'ts
76
85
 
86
+ - **Do** pass extra labelling through the `aria` prop (`aria-label`, `aria-description`).
77
87
  - **Do** keep a persistent label and spell out unit abbreviations in the `description` prop.
78
88
  - **Do** use the component state/message API so validation and status changes are announced.
79
89
  - **Do** use clear error wording that helps users recover.
80
90
  - **Don't** rely on placeholder text or the `unit` prop alone for accessible context.
81
91
  - **Don't** use `hide-label` without an accessible name.
92
+ - **Don't** add native `aria-*` attributes directly on the component host.
82
93
 
83
94
  ## Limitations
84
95
 
@@ -99,6 +110,7 @@ See [accessibility integration examples](./accessibility.md) for paired anti-pat
99
110
 
100
111
  | Property | Type | Default | Description |
101
112
  | --- | --- | --- | --- |
113
+ | `aria` | `InputNumberAriaAttribute` | `undefined` | Sets additional ARIA attributes on the native input to improve accessibility for screen readers. |
102
114
  | `autoComplete` | `string` | `undefined` | Provides the browser with a data type hint to enable relevant autofill suggestions (e.g. `autocomplete='postal-code'`). |
103
115
  | `compact` | `boolean` | `false` | Reduces the input height and padding for a more compact layout. |
104
116
  | `controls` | `boolean` | `false` | Shows increment/decrement spin buttons inside the field to adjust the numeric value by clicking. |
@@ -2,6 +2,20 @@
2
2
 
3
3
  ## Integration examples
4
4
 
5
+ ### ARIA on component host vs aria prop
6
+
7
+ #### ❌ Anti-pattern
8
+
9
+ ```tsx
10
+ <PInputPassword name="password" label="Password" aria-label="Accessible name" aria-description="Additional context"></PInputPassword>
11
+ ```
12
+
13
+ #### ✅ Recommended
14
+
15
+ ```tsx
16
+ <PInputPassword name="password" label="Password" aria={{'aria-label': 'Accessible name', 'aria-description': 'Additional context'}}></PInputPassword>
17
+ ```
18
+
5
19
  ### Placeholder used as the only label
6
20
 
7
21
  #### ❌ Anti-pattern