Skip to content

Commit

Permalink
fixed a11y issue with how multiple parent objs were being combined
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchadwick committed Nov 26, 2024
1 parent aa94006 commit a4285d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
@onExpandAll={{@onExpandAllFadeText}}
as |displayText expand collapse updateTextDims shouldFade expanded|
>
<ul>
{{#if @editable}}
<span data-test-parent>
<button type="button" class="link-button" {{on "click" @manage}} data-test-manage>
Expand All @@ -58,7 +57,6 @@
</div>
</span>
{{/if}}
</ul>
{{#if shouldFade}}
<div
class="fade-text-control"
Expand Down
5 changes: 4 additions & 1 deletion packages/ilios-common/addon/components/fade-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export default class FadeTextComponent extends Component {
}
if (typeOf(this.args.text) !== 'string') {
if (typeOf(this.args.text) === 'array') {
return this.args.text.map((elem) => `<li>${elem}</li>`).join('');
let text = '<ul>';
text += this.args.text.map((elem) => `<li>${elem}</li>`).join('');
text += '</ul>';
return text;
}
return this.args.text.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
@onExpandAll={{@onExpandAllFadeText}}
as |displayText expand collapse updateTextDims shouldFade expanded|
>
<ul>
{{#if @editable}}
<span data-test-parent>
<button type="button" class="link-button" {{on "click" @manage}} data-test-manage>
Expand All @@ -58,7 +57,6 @@
</div>
</span>
{{/if}}
</ul>
{{#if shouldFade}}
<div
class="fade-text-control"
Expand Down

0 comments on commit a4285d6

Please sign in to comment.