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

Add "action" to the list of data attributes that accept multiple values #3076

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .changeset/lemon-kiwis-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/view-components": patch
---

Add "action" to the list of data attributes that accept multiple values in the `merge_data` helper
2 changes: 1 addition & 1 deletion app/lib/primer/attributes_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Primer
# :nodoc:
module AttributesHelper
PLURAL_ARIA_ATTRIBUTES = %i[describedby labelledby].freeze
PLURAL_DATA_ATTRIBUTES = %i[target targets].freeze
PLURAL_DATA_ATTRIBUTES = %i[target targets action].freeze

def aria(val, system_arguments)
system_arguments[:"aria-#{val}"] || system_arguments.dig(:aria, val.to_sym)
Expand Down
Loading