Skip to content

Commit

Permalink
fix: typo in aria-label
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thulin committed Nov 7, 2023
1 parent ffb261f commit 0b9bfcc
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 31 deletions.
63 changes: 33 additions & 30 deletions source/php/Component/Accordion/accordion.blade.php
Original file line number Diff line number Diff line change
@@ -1,47 +1,50 @@
<!-- accordion.blade.php -->
@if($list)
<{{$componentElement}} class="{{ $class }}" js-expand-container {!! $attribute !!}>
@foreach($list as $section)
<{{$sectionElement}} class="{{$baseClass}}__section">
@foreach($list as $section)
<{{$sectionElement}} class="{{$baseClass}}__section">

<{{$sectionHeadingElement}} class="{{$baseClass}}__button" role="button" aria-label="{{$section['heading']}}" aria-controls="{{ $baseClass }}__aria-{{ $id }}-{{ $loop->index }}" aria-expanded="false" js-expand-button>
<span class="{{$baseClass}}__button-wrapper" tabindex="-1">
{!!$beforeHeading!!}
<{{$sectionHeadingElement}} class="{{$baseClass}}__button" role="button" aria-label="{{$section['heading']}}" aria-controls="{{ $baseClass }}__aria-{{ $id }}-{{ $loop->index }}" aria-expanded="false" js-expand-button>
<span class="{{$baseClass}}__button-wrapper" tabindex="-1">
{!!$beforeHeading!!}

{!! $section['heading'] !!}
@if($taxonomyPosition === 'top' && $taxonomy > 0)
@tags([
'tags' => $taxonomy
])
@endtags
@endif
{!! $section['heading'] !!}
@if($taxonomyPosition === 'top' && $taxonomy > 0)
@tags([
'tags' => $taxonomy
])
@endtags
@endif

{!!$afterHeading!!}
{!!$afterHeading!!}

@icon(['icon' => 'keyboard_arrow_down', 'size' => 'md', 'classList' => [$baseClass . '__icon']])
@endicon
</span>
</{{$sectionHeadingElement}}>
@icon(['icon' => 'keyboard_arrow_down', 'size' => 'md', 'classList' => [$baseClass . '__icon']])
@endicon

<{{$sectionContentElement}} class="{{$baseClass}}__content" id="{{ $baseClass }}__aria-{{ $id }}-{{ $loop->index }}" aria-hidden="true">
{!!$beforeContent!!}
</span>
</{{$sectionHeadingElement}}>

{!! $section['content'] !!}
<{{$sectionContentElement}} class="{{$baseClass}}__content" id="{{ $baseClass }}__aria-{{ $id }}-{{ $loop->index }}" aria-hidden="true">

{!!$beforeContent!!}

{!!$afterContent!!}
{!! $section['content'] !!}

@if($taxonomyPosition === 'below' && $taxonomy > 0)
@tags([
'tags' => $taxonomy
])
@endtags
@endif
{!!$afterContent!!}

</{{$sectionContentElement}}>
@if($taxonomyPosition === 'below' && $taxonomy > 0)
@tags([
'tags' => $taxonomy
])
@endtags
@endif

</{{$sectionElement}}>
@endforeach
</{{$sectionContentElement}}>

</{{$sectionElement}}>
@endforeach
</{{$componentElement}}>

@elseif($slotHasData)
<{{$componentElement}} class="{{ $class }}" js-expand-container {!! $attribute !!}>
{!! $slot !!}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{-- Accordion Item --}}
<{{$sectionElement}} class="{{$class}}" {!! $attribute !!}">
<{{$sectionHeadingElement}} class="{{$baseClass}}__button" aria-label="{{$heading}} aria-controls="{{ $baseClass }}__aria-{{ $id }}" aria-expanded="false" js-expand-button href="#{{$id}}">
<{{$sectionHeadingElement}} class="{{$baseClass}}__button" aria-label="{{$heading}}" aria-controls="{{ $baseClass }}__aria-{{ $id }}" aria-expanded="false" js-expand-button href="#{{$id}}">
<span class="{{$baseClass}}__button-wrapper {{$headingType}} " tabindex="-1">

{!!$beforeHeading!!}
Expand Down

0 comments on commit 0b9bfcc

Please sign in to comment.