Skip to content

Commit 76a3f2a

Browse files
committed
Merge branch 'bump/primer-upstream-ref' into bump/primer-upstream
2 parents 22cb647 + 1f830f9 commit 76a3f2a

File tree

12 files changed

+54
-34
lines changed

12 files changed

+54
-34
lines changed

.changeset/poor-parrots-fold.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@openproject/primer-view-components': patch
3+
---
4+
5+
Ensure counter content is exposed to screen reader users

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ jobs:
275275
uses: phulsechinmay/rewritable-pr-comment@v0.3.0
276276
with:
277277
message: |
278-
### ⚠️ Visual or Semantic markup differences found
278+
### ⚠️ Visual or ARIA snapshot differences found
279279
280-
Our visual and semantic markup comparison tests found UI differences. Please review the differences by viewing the files changed tab to ensure that the changes were intentional.
280+
Our visual and ARIA snapshot tests found UI differences. Please review the differences by viewing the files changed tab to ensure that the changes were intentional.
281281
282282
283283
[Review differences](https://github.com/opf/view_components/pull/${{ github.event.number }}/files?file-filters%5B%5D=.png&file-filters%5B%5D=.yml&show-viewed-files=false)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- button "Button"
22
- button "Button"
33
- button "Button"
4-
- button "Button ( )": Button ()
5-
- button "Button ( )": Button ()
6-
- button "Button ( )": Button ()
4+
- button "Button ( 15 )"
5+
- button "Button ( 15 )"
6+
- button "Button ( 15 )"
77
- button "Button with tooltip"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
- button "Star ( )": Star ()
1+
- button "Star ( 15 )"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
- button "Comment ( )": Comment ()
1+
- button "Comment ( 15 )"

app/components/primer/beta/button.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<% if trailing_visual %>
1010
<span class="Button-visual Button-trailingVisual">
1111
<% if @trailing_visual_counter %>
12+
<span class="d-flex" aria-hidden="true"><%= trailing_visual %></span>
1213
<span class="sr-only">(<%= trailing_visual %>)</span>
13-
<%= trailing_visual %>
1414
<% else %>
1515
<%= trailing_visual %>
1616
<% end %>

app/components/primer/beta/button.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class Button < Primer::Component
7070
label: Primer::Beta::Label,
7171
counter: lambda { |**system_arguments|
7272
@trailing_visual_counter = true
73-
Primer::Beta::Counter.new("aria-hidden": true, **system_arguments)
73+
Primer::Beta::Counter.new(**system_arguments)
7474
}
7575
}
7676

@@ -108,6 +108,7 @@ class Button < Primer::Component
108108
# @param align_content [Symbol] <%= one_of(Primer::Beta::Button::ALIGN_CONTENT_OPTIONS) %>
109109
# @param tag [Symbol] (Primer::Beta::BaseButton::DEFAULT_TAG) <%= one_of(Primer::Beta::BaseButton::TAG_OPTIONS) %>
110110
# @param type [Symbol] (Primer::Beta::BaseButton::DEFAULT_TYPE) <%= one_of(Primer::Beta::BaseButton::TYPE_OPTIONS) %>
111+
# @param inactive [Boolean] Whether the button looks visually disabled, but can still accept all the same interactions as an enabled button.
111112
# @param disabled [Boolean] Whether or not the button is disabled. If true, this option forces `tag:` to `:button`.
112113
# @param label_wrap [Boolean] Whether or not the button label text wraps and the button height expands.
113114
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>

demo/kuby.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ def install_from_image(image, dockerfile)
4242
password ENV["AZURE_ACR_PASSWORD"]
4343
end
4444

45+
setup_phase.base_image = "ruby:3.3"
46+
4547
image_url ENV["IMAGE_URL"] || "primer.azurecr.io/primer/view_components_storybook"
4648

4749
# Run bundler, npm, etc in this directory.

package-lock.json

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

previews/primer/alpha/tooltip_preview.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def tooltip_with_button(direction: :s, tooltip_text: "You can press a button")
6565

6666
# @label Tooltip with Primer::Beta::Link
6767
def tooltip_with_link(direction: :s, tooltip_text: "You can press a button")
68-
render(Primer::Beta::Link.new(href: "#link-with-tooltip", id: "link-with-tooltip")) do |component|
68+
render(Primer::Beta::Link.new(href: "#link-with-tooltip", id: "link-with-tooltip", underline: true)) do |component|
6969
component.with_tooltip(text: tooltip_text, direction: direction)
7070
"Button"
7171
end

0 commit comments

Comments
 (0)