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

Change ActionList::Item tag to button #1728

Merged
merged 5 commits into from
Jan 6, 2023
Merged
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/hungry-points-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/view-components': patch
---

Use a button tag for ActionList::Items
4 changes: 2 additions & 2 deletions app/components/primer/alpha/action_list/item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class Item < Primer::Component
# @param parent [Primer::Alpha::ActionList::Item] This item's parent item. `nil` if this item is at the root. Used internally.
# @param label [String] Item label.
# @param label_classes [String] CSS classes that will be added to the label.
# @param content_arguments [Hash] <%= link_to_system_arguments_docs %> used to construct the item's anchor or span tag.
# @param content_arguments [Hash] <%= link_to_system_arguments_docs %> used to construct the item's anchor or button tag.
# @param truncate_label [Boolean] Truncate label with ellipsis.
# @param href [String] Link URL.
# @param role [String] ARIA role describing the function of the item.
Expand Down Expand Up @@ -206,7 +206,7 @@ def initialize(
@content_arguments[:tag] = :a
@content_arguments[:href] = @href
else
@content_arguments[:tag] = :span
@content_arguments[:tag] = :button
@content_arguments[:onclick] = on_click if on_click
end

Expand Down