Skip to content

Commit

Permalink
Merge pull request #496 from x-govuk/add-hidden-attribute-to-password…
Browse files Browse the repository at this point in the history
…-show-button

Add hidden attribute to the password show button
  • Loading branch information
peteryates authored Apr 16, 2024
2 parents 58f5f0a + 3328cd0 commit 02c3663
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/govuk_design_system_formbuilder/elements/password.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def button_options
data: { module: %(#{brand}-button) },
aria: { label: "Show password", controls: field_id(link_errors: true) },
type: 'button',
hidden: true,
class: %w(button button--secondary password-input__toggle js-password-input-toggle).prefix(brand)
}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

specify 'the button has the right attributes' do
expected_attributes = {
"hidden" => "hidden",
"data-module" => "govuk-button",
"aria-label" => "Show password",
"aria-controls" => "person-password-field",
Expand Down

0 comments on commit 02c3663

Please sign in to comment.