Skip to contentPorsche Design System
You are currently viewing an earlier release of the Porsche Design System.Switch to the latest Porsche Design System documentation.
SearchGitHub repository of Porsche Design SystemOpen settings sidebar
Input Search Table of Contents Accessibility support Keyboard Key / stateFunctionTab, Shift-TabMoves focus to the next (or previous) focusable element. ARIA enhancements External ARIA provided by the aria property: Use the aria property to pass supported attributes to the native <input> inside the shadow DOM, for example when you implement a combobox-style pattern (search field + suggestion list). ARIAUsageroleOverrides the implicit role when needed (e.g. combobox for an autocomplete pattern alongside a separate listbox).aria-autocompleteIndicates whether and how the component predicts text (none, inline, list, both).aria-activedescendantIdentifies the currently highlighted suggestion. Pass the element itself when it lives outside the shadow tree.aria-controlsIdentifies the element(s) whose contents or presence are controlled by the input (e.g. the suggestion list). Pass the element, or a list of elements, when it lives outside the shadow tree.aria-expandedIndicates whether the suggestion popup or related surface is expanded or collapsed.aria-haspopupIndicates that activating the input triggers a popup (e.g. listbox, dialog).aria-labelDefines an accessible name when the visible label is insufficient or hidden; prefer a visible label for most cases.aria-descriptionProvides additional context for assistive technologies without replacing the accessible name. You can pass a JSON object on the element (vanilla JS) or use your framework’s prop binding, for example aria={{ role: 'combobox', 'aria-expanded': isOpen, 'aria-haspopup': 'listbox' }}. Internal ARIA that is managed by the component: The following apply in addition to any aria values you pass. On the native search input, aria-describedby, aria-invalid, aria-disabled, and aria-readonly are always set by the component and take precedence over the same keys if they were supplied in aria. ARIAUsagearia-describedby="IDREF"Combines references for description, state message, and loading feedback on the native input.aria-invalid="true"When state is error.aria-disabled="true"When disabled or loading is active.aria-readonly="true"When readOnly is active.role="status", role="alert"When message and state or loading change, the status message region is exposed for announcements.aria-hidden="true"On decorative icons (e.g. search indicator). Development considerations Disabled state In general, avoid using the disabled state. Disabled elements are no longer focusable and may be missed by screen reader users. They can also confuse sighted users if the reason they are disabled is not made clear. Combobox and suggestion lists A working list of choices that writes the selected one back into the field lives in the search combobox option list example. When a match is a page of its own, the search combobox link list example keeps the results as links inside a dialog. Both patterns use a dealer search as an integration example. For a search field that controls a separate list of choices and writes the choice back into the field, set the aria property so the input exposes the expected semantics supported by this component, for example: role: 'combobox' aria-controls referring to the controlled region. A string id does not resolve across the shadow boundary; pass the element (or a list of elements) instead: aria={{ 'aria-controls': listElement, 'aria-activedescendant': activeElement }}. That sets ariaControlsElements and ariaActiveDescendantElement on the native <input> aria-activedescendant referring to the highlighted suggestion, again as an element when that suggestion is outside the shadow tree aria-expanded reflecting open/closed state aria-haspopup indicating the presence of a popup (e.g. listbox) aria-autocomplete as required by your pattern Associate the suggestion list and keyboard interaction in the host application according to the ARIA combobox pattern you implement there. Common do's and don'ts Do keep a persistent label and pass combobox-related ARIA through the aria prop when needed. Do use the component state/message API so validation and status changes are announced. Do use clear error wording that helps users recover. Don't rely on placeholder text as the only label. Don't add native aria-* attributes directly on the component host. Don't use hide-label without an accessible name. Limitations A string id in aria-controls or aria-activedescendant cannot name an element across the shadow boundary. Pass the element instead (aria={{ 'aria-controls': listElement, 'aria-activedescendant': activeElement }}) and the component sets ariaControlsElements and ariaActiveDescendantElement on the native <input>. aria-owns is not forwarded. ARIASupportaria-owns🚫aria-controlsString id only inside the same tree. An element, or a list of elements, crosses the shadow boundary.aria-activedescendantString id only inside the same tree. An element crosses the shadow boundary. Integration examples
Placeholder used as the only label❌ Anti-pattern
<p-input-search name="search" placeholder="Search"></p-input-search>
✅ Recommended
<p-input-search name="search" label="Search vehicles" description="Search by model name or VIN."></p-input-search>
ARIA on component host vs aria prop❌ Anti-pattern
<p-input-search name="search" label="Search vehicles" role="combobox" aria-expanded="false" aria-haspopup="listbox"></p-input-search>
✅ Recommended
<p-input-search name="search" label="Search vehicles" aria="{'role': 'combobox', 'aria-expanded': 'false', 'aria-haspopup': 'listbox'}"></p-input-search>
Hidden label without accessible name❌ Anti-pattern
<p-input-search name="search" hide-label="true"></p-input-search>
✅ Recommended
<p-input-search name="search" hide-label="true" label="Search vehicles"></p-input-search>
Validation feedback via state and message API❌ Anti-pattern
<p-input-search name="search" label="Search vehicles" aria-invalid="true" message="Invalid"></p-input-search>
✅ Recommended
<p-input-search name="search" label="Search vehicles" state="error" message="Enter at least 3 characters to search."></p-input-search>
Tests Automated TechnologySupportAXE-Core (WCAG 2.2 AA, Best-Practice)✅High-Contrast Mode (light/dark)✅Text-Zoom (200%)✅ Manual TechnologySupportKeyboard✅Screen reader (VoiceOver, NVDA)✅
v4.11.0v2v1
Global settingsColor SchemeAll color tokens use the light-dark() CSS function. Set the theme via the CSS color-scheme property: light for light mode, dark for dark mode, or light dark to follow the user's system preference.LightDarkLight DarkDirectionThe dir global attribute in HTML changes the direction of text and other content within an element. It's most often used on the <html> tag to set the entire page's direction, which is crucial for supporting languages that are written from right to left (RTL), such as Arabic and Hebrew. For example, using <html dir="rtl"> makes the entire page display from right to left, adjusting the layout and text flow accordingly.LTR (left-to-right)RTL (right-to-left)Text ZoomTo ensure accessibility and comply with WCAG 2.2 AA standards, it is mandatory for web content to support text resizing up to at least 200% without loss of content or functionality. Using relative units like rem is a best practice for achieving this, as they allow the text to scale uniformly based on the user's browser settings.100%130%150%200%