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

feat(*): role property to icon, focusable remove chip #488

Merged
merged 4 commits into from
Aug 26, 2022

Conversation

ChronosSF
Copy link
Member

Closes #480

@rkaraivanov
Copy link
Member

@ChronosSF

While this PR fixes the focus issue, triggering an "activation" event through Space | Enter on the remove button does not fire the igcRemove event.
It does it on click, so this also falls under general accessibility.

I suggest we fix that too either in this PR or in a new one.

@ChronosSF ChronosSF requested a review from rkaraivanov August 24, 2022 13:14
src/components/chip/chip.ts Outdated Show resolved Hide resolved
@@ -78,7 +78,9 @@ export default class IgcIconComponent extends SizableMixin(LitElement) {

public override connectedCallback() {
super.connectedCallback();
this.setAttribute('role', 'img');
if (!this.getAttribute('role')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!this.getAttribute('role')) {
if (!this.hasAttribute('role')) {

stories/icon.stories.ts Outdated Show resolved Hide resolved
src/components/chip/chip.ts Outdated Show resolved Hide resolved
@rkaraivanov rkaraivanov self-assigned this Aug 26, 2022
@rkaraivanov rkaraivanov merged commit 1a2ee2c into master Aug 26, 2022
@rkaraivanov rkaraivanov deleted the sstoychev/making-chip-remove-focusable branch August 26, 2022 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y When the issue or PR is related to accessibility chip icon ✅ status: verified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chip Remove icon
2 participants