Skip to content

fix: do not set selected state on the select value item (#13238) (CP: 25.3) - #13242

Merged
web-padawan merged 1 commit into
25.3from
cherry-pick-13238-to-25.3-1792747962377
Oct 23, 2026
Merged

web-padawan merged 1 commit into
25.3from
cherry-pick-13238-to-25.3-1792747962377

Conversation

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #13238 to branch 25.3.


Description

Related to #13176

The value item got selected = true after its item attributes were removed, only so the Lumo placeholder style could tell the placeholder item from a selected one. For an item with the label attribute and for a disabled item, this added aria-selected="true" back to an element that has no role.

  • Removed selected and aria-selected from the item shown in vaadin-select-value-button, together with the other item state attributes
  • Changed the Lumo placeholder rule to use the placeholder attribute of the value button instead of :not([selected])
  • Added tests that the label wrapper and the disabled item clone have no selected or aria-selected attribute

Type of change

  • Bugfix

How to test

  1. Open dev/select.html
  2. In the browser console, run document.querySelector('vaadin-select').value = 'xs'
  3. Inspect the vaadin-select-item inside vaadin-select-value-button
  4. The item has no selected and no aria-selected attribute

[!NOTE]
Custom CSS that targets vaadin-select-item[selected] no longer applies to the item shown in the field.

🤖 Generated with Claude Code

@sonarqubecloud

Copy link
Copy Markdown

@vaadin-bot

Copy link
Copy Markdown
Collaborator Author

This PR is eligible for auto-merging policy, so it has been approved automatically. If there are pending conditions, auto merge (with 'squash' method) has been enabled for this PR [Message is sent from bot]

@vaadin-bot
vaadin-bot enabled auto-merge (squash) October 23, 2026 09:40
@web-padawan
web-padawan disabled auto-merge October 23, 2026 09:48
@web-padawan
web-padawan merged commit 05fe984 into 25.3 Oct 23, 2026
13 checks passed
@web-padawan
web-padawan deleted the cherry-pick-13238-to-25.3-1792747962377 branch October 23, 2026 09:49
@vaadin-bot

Copy link
Copy Markdown
Collaborator Author

This ticket/PR has been released with Vaadin 25.3.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants