diff --git a/src/views/dropdown/DropdownDoc.vue b/src/views/dropdown/DropdownDoc.vue index 39ca3119f..700815f27 100755 --- a/src/views/dropdown/DropdownDoc.vue +++ b/src/views/dropdown/DropdownDoc.vue @@ -119,7 +119,7 @@ export default {
Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
+Any property of HTMLDivElement are passed to the main container element. Following are the additional properties to configure the component.
false | When enabled, a clear icon is displayed to clear the value. | -|||
tabindex | -number | -null | -Index of the element in tabbing order. | -|
inputId | string | @@ -252,10 +246,52 @@ export default {Identifier of the underlying input element. | ||
ariaLabelledBy | +inputStyle | +any | +null | +Inline style of the input field. | +
inputClass | string | null | -Establishes relationships between the component and label(s) where its value should be one or more element IDs. | +Style class of the input field. | +
inputProps | +object | +null | +Uses to pass all properties of the HTMLInputElement/HTMLSpanElement to the focusable input element inside the component. | +|
panelStyle | +any | +null | +Inline style of the overlay panel. | +|
panelClass | +string | +null | +Style class of the overlay panel. | +|
panelProps | +object | +null | +Uses to pass all properties of the HTMLDivElement to the overlay panel inside the component. | +|
filterInputProps | +object | +null | +Uses to pass all properties of the HTMLInputElement to the filter input inside the component. | +|
clearIconProps | +object | +null | +Uses to pass all properties of the HTMLElement to the clear icon inside the component. | |
appendTo | @@ -264,24 +300,6 @@ export default {A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are "body" for document body and "self" for the element itself. | |||
emptyFilterMessage | -string | -No results found | -Text to display when filtering does not return any results. Defaults to value from PrimeVue locale configuration. | -|
emptyMessage | -string | -No results found | -Text to display when there are no options available. Defaults to value from PrimeVue locale configuration. | -|
panelClass | -string | -null | -Style class of the overlay panel. | -|
loading | boolean | @@ -299,6 +317,60 @@ export default {object | null | Whether to use the virtualScroller feature. The properties of |
+
autoOptionFocus | +boolean | +true | +Whether to focus on the first visible or selected element when the overlay panel is shown. | +|
filterMessage | +string | +{0} results are available | +Text to be displayed in hidden accessible field when filtering returns any results. Defaults to value from PrimeVue locale configuration. | +|
selectionMessage | +string | +{0} items selected | +Text to be displayed in hidden accessible field when options are selected. Defaults to value from PrimeVue locale configuration. | +|
emptySelectionMessage | +string | +No selected item | +Text to be displayed in hidden accessible field when any option is not selected. Defaults to value from PrimeVue locale configuration. | +|
emptyFilterMessage | +string | +No results found | +Text to be displayed when filtering does not return any results. Defaults to value from PrimeVue locale configuration. | +|
emptyMessage | +string | +No results found | +Text to be displayed when there are no options available. Defaults to value from PrimeVue locale configuration. | +|
tabindex | +number | +0 | +Index of the element in tabbing order. | +|
ariaLabel | +string | +null | +Defines a string value that labels an interactive element. | +|
ariaLabelledby | +string | +null | +Establishes relationships between the component and label(s) where its value should be one or more element IDs. |
Value to describe the component can either be provided with aria-labelledby or aria-label props. The dropdown element has a combobox role + in addition to aria-haspopup and aria-expanded attributes. If the editable option is enabled aria-autocomplete is also added. + The relation between the combobox and the popup is created with aria-controls and aria-activedescendant attribute is used + to instruct screen reader which option to read during keyboard navigation within the popup list.
+The popup list has an id that refers to the aria-controls attribute of the combobox element and uses listbox as the role. Each list item has an option role, an id to match the aria-activedescendant of the input element along with aria-label, aria-selected and aria-disabled attributes.
+ +If filtering is enabled, filterInputProps can be defined to give aria-* props to the filter input element.
+
+<span id="dd1">Options</span>
+<Dropdown aria-labelledby="dd1" />
+
+<Dropdown aria-label="Options" />
+
+
+
+ Key | +Function | +
---|---|
tab | +Moves focus to the dropdown element. | +
space | +Opens the popup and moves visual focus to the selected option, if there is none then first option receives the focus. | +
enter | +Opens the popup and moves visual focus to the selected option, if there is none then first option receives the focus. | +
down arrow | +Opens the popup and moves visual focus to the selected option, if there is none then first option receives the focus. | +
up arrow | +Opens the popup and moves visual focus to the selected option, if there is none then last option receives the focus. | +
any printable character | +Opens the popup and moves focus to the option whose label starts with the characters being typed, if there is none and dropdown is not editable then first option receives the focus. | +
Key | +Function | +
---|---|
tab | +Moves focus to the next focusable element in the popup. If there is none, the focusable option is selected and the overlay is closed then moves focus to next element in page. | +
shift + tab | +Moves focus to the previous focusable element in the popup. If there is none, the focusable option is selected and the overlay is closed then moves focus to next element in page. | +
enter | +Selects the focused option and closes the popup, then moves focus to the dropdown element. | +
space | +Selects the focused option and closes the popup, then moves focus to the dropdown element. | +
escape | +Closes the popup, then moves focus to the dropdown element. | +
down arrow | +Moves focus to the next option, if there is none then visual focus does not change. | +
up arrow | +Moves focus to the previous option, if there is none then visual focus does not change. | +
alt + up arrow | +Selects the focused option and closes the popup, then moves focus to the dropdown element. | +
left arrow | +If the dropdown is editable, removes the visual focus from the current option and moves input cursor to one character left. | +
right arrow | +If the dropdown is editable, removes the visual focus from the current option and moves input cursor to one character right. | +
home | +If the dropdown is editable, moves input cursor at the end, if not then moves focus to the first option. | +
end | +If the dropdown is editable, moves input cursor at the beginning, if not then moves focus to the last option. | +
pageUp | +Jumps visual focus to first option. | +
pageDown | +Jumps visual focus to last option. | +
any printable character | +Moves focus to the option whose label starts with the characters being typed if dropdown is not editable. | +
Key | +Function | +
---|---|
down arrow | +Moves focus to the next option, if there is none then visual focus does not change. | +
up arrow | +Moves focus to the previous option, if there is none then visual focus does not change. | +
left arrow | +Removes the visual focus from the current option and moves input cursor to one character left. | +
right arrow | +Removes the visual focus from the current option and moves input cursor to one character right. | +
home | +Moves input cursor at the end, if not then moves focus to the first option. | +
end | +Moves input cursor at the beginning, if not then moves focus to the last option. | +
enter | +Closes the popup and moves focus to the dropdown element. | +
escape | +Closes the popup and moves focus to the dropdown element. | +
tab | +Moves focus to the next focusable element in the popup. If there is none, the focusable option is selected and the overlay is closed then moves focus to next element in page. | +
None.