Skip to content

Commit

Permalink
Merge pull request #1382 from plone/erral-issue-1381
Browse files Browse the repository at this point in the history
Translate Close text as aria-label
  • Loading branch information
petschki committed Jun 12, 2024
2 parents c8cec08 + 7080868 commit a406f57
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pat/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import _ from "underscore";
import Backdrop from "../backdrop/backdrop";
import registry from "@patternslib/patternslib/src/core/registry";
import utils from "../../core/utils";
import _t from "../../core/i18n";
import _t from "../../core/i18n-wrapper";

import "jquery-form";

Expand Down Expand Up @@ -58,7 +58,7 @@ export default Base.extend({
' <div class="<%= options.classModal %>" role="document">' +
' <div class="<%= options.classHeaderName %>">' +
' <% if (title) { %><h5 class="modal-title" id="modal-title" tabindex="0"><%= title %></h5><% } %>' +
' <button type="button" class="btn-close modal-close" aria-label="Close"></button>' +
' <button type="button" class="btn-close modal-close" aria-label="<%= closeButtonLabel %>"></button>' +
" </div>" +
' <div class="<%= options.classBodyName %>">' +
' <div class="<%= options.classPrependName %>"><%= prepend %></div> ' +
Expand Down Expand Up @@ -396,6 +396,7 @@ export default Base.extend({
modalSizeClass: options.modalSizeClass,
buttons: '<div class="pattern-modal-buttons"></div>',
options: options.templateOptions,
closeButtonLabel: _t("Close"),
};

// setup the Title
Expand Down

0 comments on commit a406f57

Please sign in to comment.