Skip to content

Commit

Permalink
AO3-6566 ARIA controls must contain the exact ID
Browse files Browse the repository at this point in the history
The ID of the modal controlled by the link to modal is `modal`. The hash
sign must not be included in the reference to the element.
  • Loading branch information
neuroalien committed Jul 24, 2023
1 parent f09c964 commit 145e9ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def link_to_modal(content = "", options = {})
options[:for] ||= ""
options[:title] ||= options[:for]

html_options = { "class" => options[:class] + " modal", "title" => options[:title], "aria-controls" => "#modal" }
html_options = { "class" => options[:class] + " modal", "title" => options[:title], "aria-controls" => "modal" }
link_to content, options[:for], html_options
end

Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/ao3modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ jQuery(document).ready(function() {
.append(img);

a.addClass('modal modal-attached')
.attr('aria-controls', '#modal')
.attr('aria-controls', 'modal')
.filter(function() {
return $(this).closest('.userstuff').length === 0;
}).click(function(event){
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/ao3modal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 145e9ad

Please sign in to comment.