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

Allow translation for aria label of close button #424

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
3 changes: 2 additions & 1 deletion src/featherlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
closeOnClick: 'background', /* Close lightbox on click ('background', 'anywhere' or false) */
closeOnEsc: true, /* Close lightbox when pressing esc */
closeIcon: '✕', /* Close icon */
closeLabel: 'Close', /* Aria label for the close button */
loading: '', /* Content to show while initial content is loading */
persist: false, /* If set, the content will persist and will be shown again when opened again. 'shared' is a special value when binding multiple elements for them to share the same content */
otherClose: null, /* Selector for alternate close buttons (e.g. "a.close") */
Expand Down Expand Up @@ -183,7 +184,7 @@
$background = $(self.background || [
'<div class="'+css+'-loading '+css+'">',
'<div class="'+css+'-content">',
'<button class="'+css+'-close-icon '+ self.namespace + '-close" aria-label="Close">',
'<button class="'+css+'-close-icon '+ self.namespace + '-close" aria-label="' + self.closeLabel + '">',
self.closeIcon,
'</button>',
'<div class="'+self.namespace+'-inner">' + self.loading + '</div>',
Expand Down