Most docs are complete

This commit is contained in:
Ronan Berder
2025-04-29 19:14:31 +08:00
parent dc5464d9a3
commit 0ab66c17a6
18 changed files with 933 additions and 353 deletions
@@ -10,7 +10,7 @@
init() {
this.$nextTick(() => {
this.menuItems = Array.from(this.$el.querySelectorAll('[role=menuitem]:not([disabled])'));
this.menuItems = Array.from(this.$el.querySelectorAll('[role=menuitem]:not([disabled]),[role=menuitemcheckbox]:not([disabled]),[role=menuitemradio]:not([disabled])'));
});
},
focusMenuitem() {
@@ -44,7 +44,7 @@
}
},
handleMenuitemClick(event) {
const menuitem = event.target.closest('[role=menuitem]');
const menuitem = event.target.closest('[role=menuitem],[role=menuitemcheckbox],[role=menuitemradio]');
if (menuitem && menuitem.getAttribute('aria-disabled') !== 'true' && !menuitem.disabled) {
this.$nextTick(() => {
this.$refs.trigger.focus();
@@ -53,7 +53,7 @@
}
},
handleMenuitemMousemove(event) {
const menuitem = event.target.closest('[role=menuitem]');
const menuitem = event.target.closest('[role=menuitem],[role=menuitemcheckbox],[role=menuitemradio]');
if (menuitem && menuitem.getAttribute('aria-disabled') !== 'true' && !menuitem.disabled) {
this.focusedIndex = this.menuItems.indexOf(menuitem);
this.focusMenuitem();
+2 -2
View File
@@ -20,7 +20,7 @@
{% if key != 'class' %}{{ key }}="{{ value }}"{% endif %}
{% endfor %}
>
<div
<nav
role="tablist"
aria-orientation="horizontal"
x-bind="$tablist"
@@ -43,7 +43,7 @@
{{ tabset.tab | safe }}
</button>
{% endfor %}
</div>
</nav>
{% for tabset in tabsets %}
{% if tabset.panel %}