Skip to content

Commit

Permalink
tweaks to make the bots happy
Browse files Browse the repository at this point in the history
  • Loading branch information
joewhitsitt committed Jan 10, 2025
1 parent 1fe3055 commit d3c9460
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 0 additions & 4 deletions src/assets/js/accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ class Accordion {
*/
toggleAccordionItem(accordionItem, isOpening) {

// Set the relevant attributes for 'accordion' based on 'open'.
accordionItem.setAttribute('aria-expanded', isOpening);
accordionItem.setAttribute('aria-selected', isOpening);

// Check if the accordion was clicked.
const clicked = accordionItem.getAttribute('data-accordion-clicked');
if (clicked) {
Expand Down
6 changes: 2 additions & 4 deletions src/components/accordion/Accordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,18 @@ onMounted(() => {
<div
:class="accordionClasses"
role="tablist"
:aria-multiselectable="props.multiselectable ? 'true' : 'false'"
:aria-owns="ariaOwnsIds()"
>
<details v-for="(item, index) in props.items"
:key="index"
class="accordion__item"
:aria-labelledby="'accordion-heading-' + index"
:name="!props.multiselectable ? 'accordion-collection' : null"
:open="item.open"
:id="'accordion-item-' + index"
role="none"
>
<summary :id="'accordion-heading-' + index" class="accordion__heading"
:aria-expanded="item.open ? 'true' : 'false'"
:aria-selected="item.open ? 'true' : 'false'"
role="tab"
>
<h2>
Expand All @@ -70,7 +69,6 @@ onMounted(() => {
<div
:id="'accordion-content-' + index"
class="accordion__content"
:aria-labelledby="'accordion-heading-' + index"
v-html="item.content"
></div>
</details>
Expand Down

0 comments on commit d3c9460

Please sign in to comment.