Compare commits

..

1 Commits

Author SHA1 Message Date
Liam DeBeasi
726e4aeae7 add spinbutton poc 2023-10-10 16:22:34 -04:00

View File

@@ -417,7 +417,7 @@ export class PickerColumnInternal implements ComponentInterface {
const { items, color, isActive, numericInput, value } = this;
const mode = getIonMode(this);
const activeItemIndex = items.findIndex(item => item.value === value);
const activeItem = items.find(item => item.value === value);
/**
* exportparts is needed so ion-datetime can expose the parts
@@ -427,7 +427,11 @@ export class PickerColumnInternal implements ComponentInterface {
*/
return (
<Host
role="listbox"
role="spinbutton"
aria-valuemin="0"
aria-valuemax="0"
aria-valuenow={activeItem ? activeItem.value : null}
aria-valuetext={activeItem ? activeItem.text : null}
exportparts={`${PICKER_ITEM_PART}, ${PICKER_ITEM_ACTIVE_PART}`}
tabindex={0}
class={createColorClasses(color, {
@@ -458,9 +462,6 @@ export class PickerColumnInternal implements ComponentInterface {
}
return (
<button
role="option"
aria-selected={activeItemIndex === index ? 'true' : null}
aria-hidden={activeItemIndex === index || Math.abs(activeItemIndex - index) <= 2 ? null : 'true'}
tabindex="-1"
class={{
'picker-item': true,