Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIO-9008 Added some of the missing accessibility tags to bootstrap5 #102

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/templates/bootstrap5/dialog/form.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<div class="formio-dialog-overlay" ref="dialogOverlay"></div>
<div class="formio-dialog-content" ref="dialogContents" role="dialog">
<div ref="dialogContents"></div>
<button class="formio-dialog-close float-end btn-sm" aria-label="Close modal window." ref="dialogClose"></button>
<button class="formio-dialog-close float-end btn-sm" title="Close" aria-label="Close modal window." ref="dialogClose"></button>
</div>
</div>
2 changes: 1 addition & 1 deletion src/templates/bootstrap5/file/form.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
<span>
<img ref="fileImage" src="" alt="{{file.originalName || file.name}}" style="width:{{ctx.component.imageSize}}px">
{% if (!ctx.disabled) { %}
<i tabindex="0" class="{{ctx.iconClass('remove')}}" ref="removeLink"></i>
<i tabindex="0" class="{{ctx.iconClass('remove')}}" ref="removeLink" aria-label="Remove button. Press to remove {{file.originalName || file.name}} file"></i>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of a minor nit but do we need to use ctx.t() here to potentially internationalize this accessibility message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brendanbond as far as I know, ctx.t() only works with static strings. Will it work with a string that has variables like it has in that case?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, it takes interpolation context as a second arg, e.g. see here

{% } %}
</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/templates/bootstrap5/table/form.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<thead>
<tr>
{% ctx.component.header.forEach(function(header) { %}
<th>{{ctx.t(header)}}</th>
<th scope="col">{{ctx.t(header)}}</th>
{% }) %}
</tr>
</thead>
Expand All @@ -18,7 +18,7 @@
{% ctx.tableComponents.forEach(function(row, rowIndex) { %}
<tr ref="row-{{ctx.id}}">
{% row.forEach(function(column, colIndex) { %}
<td ref="{{ctx.tableKey}}-{{rowIndex}}"{% if (ctx.cellClassName) { %} class="{{ctx.cellClassName}}"{% } %}>{{column}}</td>
<td scope="col" ref="{{ctx.tableKey}}-{{rowIndex}}"{% if (ctx.cellClassName) { %} class="{{ctx.cellClassName}}"{% } %}>{{column}}</td>
{% }) %}
</tr>
{% }) %}
Expand Down
Loading