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

fix(tree-view): associate tree node content with checkbox as label #446

Merged
merged 2 commits into from Jan 10, 2023

Conversation

kevinbuhmann
Copy link
Member

PR Checklist

  • [N/A] Tests for the changes have been added (for bug fixes / features)
  • [N/A] Docs have been added / updated (for bug fixes / features)
  • [N/A] If applicable, have a visual design approval

PR Type

Bugfix

What is the current behavior?

The tree node content is not a label for the checkbox; therefore, it is not included in the checkbox's click target.

Issue Number: VPAT-791

What is the new behavior?

The tree node content is rendered in the checkbox's label; therefore, it is included in the checkbox's click target.

Does this PR introduce a breaking change?

Technically, yes. The internal DOM structure of the tree node component has been changed. The .clr-treenode-content element is no longer rendered for selectable tree nodes; instead, the tree node content is rendered inside the checkbox's label element.

There are not `.label` elements in `.clr-treenode-content`.
This change allows clicking the tree node content to select/deselect
the tree node.

The code initializes `this._model.textContent` had to be moved to
after view init because the DOM element's text content wasn't available
in after content init after the DOM structure changes.

VPAT-791

BREAKING CHANGE: The internal DOM structure of the tree node component
has been changed. The `.clr-treenode-content` element is no longer
rendered for selectable tree nodes; instead, the tree node content is
rendered inside the checkbox's label element.
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2023

👋 @kevinbuhmann,

  • 🙏 The Clarity team thanks you for opening a pull request
  • 🎉 The build for this PR has succeeded
  • 🔍 The PR is now ready for review
  • 🍿 In the meantime, checkout out a preview of this PR
  • 🖐 You can always follow up here. If you're a VMware employee, you can also reach us on our internal #clarity-support Slack channel

Thank you,

🤖 Clarity Release Bot

@pdaigle pdaigle added the a11y label Jan 6, 2023
@kevinbuhmann kevinbuhmann merged commit 6a24e3d into beta Jan 10, 2023
@kevinbuhmann kevinbuhmann deleted the kevin/breaking/tree-view-click-target branch January 10, 2023 15:58
@github-actions
Copy link
Contributor

🎉 This PR is included in version 15.0.0-beta.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed PRs after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants