File tree Expand file tree Collapse file tree 5 files changed +31
-2
lines changed
Expand file tree Collapse file tree 5 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -296,7 +296,8 @@ const initState = ({
296296 content : state . displayOnlyContent ,
297297 always : ! ! state . displayOnlyContent ,
298298 ...props . tooltipConfig
299- } ) )
299+ } ) ) ,
300+ ariaListId : 'tiny-select-' + crypto . randomUUID ( ) . slice ( - 8 )
300301 } )
301302
302303 return state
Original file line number Diff line number Diff line change 2121 )
2222 "
2323 data-tag =" tiny-option"
24+ role =" option"
25+ :aria-label =" state.currentLabel"
26+ :aria-selected =" state.itemSelected"
2427 >
2528 <span v-if =" state.selectMultiple" class =" w-4 mr-2" >
2629 <component
Original file line number Diff line number Diff line change 1717 },
1818 highlightClass
1919 ]"
20+ role =" option"
21+ :aria-label =" state.currentLabel"
22+ :aria-selected =" state.itemSelected"
2023 >
2124 <span v-if =" state.selectMultiple" class =" tiny-option__checkbox-wrap tiny-select-dropdown__item-checkbox" >
2225 <component :is =" `icon-${state.selectCls}`" :class =" `tiny-svg-size ${state.selectCls}`" />
Original file line number Diff line number Diff line change 245245 'max-width': state.inputWidth - 42 + 'px',
246246 height: 'auto'
247247 }"
248+ role =" combobox"
249+ aria-haspopup =" listbox"
250+ aria-autocomplete =" list"
251+ :aria-owns =" state.ariaListId"
252+ :aria-controls =" state.ariaListId"
248253 />
249254 </div >
250255 <tiny-input
277282 @mouseenter =" onMouseenterNative"
278283 @mouseleave =" onMouseleaveNative"
279284 @compositionend.native =" handleComposition"
285+ role =" combobox"
286+ aria-haspopup =" listbox"
287+ aria-autocomplete =" list"
288+ :aria-owns =" state.ariaListId"
289+ :aria-controls =" state.ariaListId"
280290 >
281291 <template #prefix v-if =" slots .prefix " >
282292 <slot name =" prefix" ></slot >
340350 :popper-options =" popperOptions"
341351 :class =" m('duration-300')"
342352 :height =" dropdownHeight"
353+ role =" listbox"
354+ :id =" state.ariaListId"
343355 >
344356 <div
345357 v-if =" shape && filterable"
451463 <component
452464 :is =" `icon-${state.selectCls}`"
453465 :class ="
454- m(['-mt-0.5 mr-2 fill-color-icon-secondary w-3.5 h-3.5 ', state.selectCls !== 'check' && 'fill-color-brand text-color-brand'])
466+ m([
467+ '-mt-0.5 mr-2 fill-color-icon-secondary w-3.5 h-3.5 ',
468+ state.selectCls !== 'check' && 'fill-color-brand text-color-brand'
469+ ])
455470 "
456471 />
457472 <span :class =" [state.selectCls === 'checked-sur' ? 'text-color-brand' : 'text-color-text-primary']" >
Original file line number Diff line number Diff line change 294294 @mouseenter =" onMouseenterNative"
295295 @mouseleave =" onMouseleaveNative"
296296 @compositionend.native =" handleComposition"
297+ role =" combobox"
298+ aria-haspopup =" listbox"
299+ aria-autocomplete =" list"
300+ :aria-owns =" state.ariaListId"
301+ :aria-controls =" state.ariaListId"
297302 >
298303 <template #prefix v-if =" slots .prefix " >
299304 <slot name =" prefix" ></slot >
354359 v-show =" !onCopying() && !hideDrop && state.visible && state.emptyText !== false"
355360 :style =" dropStyle"
356361 :popper-options =" popperOptions"
362+ role =" listbox"
363+ :id =" state.ariaListId"
357364 >
358365 <div
359366 v-if =" shape && filterable"
You can’t perform that action at this time.
0 commit comments