Skip to content

Commit

Permalink
chore: Merge prerelease/minor into prerelease/major (#2876)
Browse files Browse the repository at this point in the history
Co-authored-by: @NicholasBoll <nicholas.boll@gmail.com>
Co-authored-by: @NicholasBoll <nicholas.boll@gmail.com>
Co-authored-by: @thunguyen19 <thuminhnguyen@berkeley.edu>
Co-authored-by: @mannycarrera4 <mannycarrera4@users.noreply.github.com>
Co-authored-by: manuel.carrera <manuel.carrera@workday.com>
Co-authored-by: @mannycarrera4 <mannycarrera4@users.noreply.github.com>
Co-authored-by: @myvuuu <myvuuu@users.noreply.github.com>
Co-authored-by: @dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
7 people authored Aug 21, 2024
2 parents 3b7726a + 7f377cd commit e249801
Show file tree
Hide file tree
Showing 39 changed files with 773 additions and 165 deletions.
89 changes: 89 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,102 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [v11.1.3](https://github.com/Workday/canvas-kit/releases/tag/v11.1.3) (2024-08-20)

### Components

- fix: Update select to trigger onChange ([#2874](https://github.com/Workday/canvas-kit/pull/2874)) ([@mannycarrera4](https://github.com/mannycarrera4), manuel.carrera)


## [v10.3.53](https://github.com/Workday/canvas-kit/releases/tag/v10.3.53) (2024-08-20)

### Components

- fix: Update select to trigger onChange ([#2874](https://github.com/Workday/canvas-kit/pull/2874)) ([@mannycarrera4](https://github.com/mannycarrera4), manuel.carrera)
## [v11.1.2](https://github.com/Workday/canvas-kit/releases/tag/v11.1.2) (2024-08-20)




## [v11.1.1](https://github.com/Workday/canvas-kit/releases/tag/v11.1.1) (2024-08-20)

### Components

- fix(select): Clicking the input closes the menu ([#2869](https://github.com/Workday/canvas-kit/pull/2869)) ([@NicholasBoll](https://github.com/NicholasBoll))


## [v10.3.52](https://github.com/Workday/canvas-kit/releases/tag/v10.3.52) (2024-08-14)

### Components

- fix(select): Clicking the input closes the menu ([#2869](https://github.com/Workday/canvas-kit/pull/2869)) ([@NicholasBoll](https://github.com/NicholasBoll))
## [v11.1.0](https://github.com/Workday/canvas-kit/releases/tag/v11.1.0) (2024-08-14)




## [v11.0.27](https://github.com/Workday/canvas-kit/releases/tag/v11.0.27) (2024-08-12)

### Components

- fix(Checkbox): Remove console warning ([#2863](https://github.com/Workday/canvas-kit/pull/2863)) ([@thunguyen19](https://github.com/thunguyen19))


## [v11.0.26](https://github.com/Workday/canvas-kit/releases/tag/v11.0.26) (2024-08-05)

### Accessibility

- fix: Set aria-modal to false for better accessibility ([#2855](https://github.com/Workday/canvas-kit/pull/2855)) ([@mannycarrera4](https://github.com/mannycarrera4), manuel.carrera)


## [v10.3.51](https://github.com/Workday/canvas-kit/releases/tag/v10.3.51) (2024-08-05)

### Accessibility

- fix: Set aria-modal to false for better accessibility ([#2855](https://github.com/Workday/canvas-kit/pull/2855)) ([@mannycarrera4](https://github.com/mannycarrera4), manuel.carrera)
## [v11.0.25](https://github.com/Workday/canvas-kit/releases/tag/v11.0.25) (2024-08-05)

### Components

- fix(combobox): Use correct state for aria-selected ([#2849](https://github.com/Workday/canvas-kit/pull/2849)) ([@NicholasBoll](https://github.com/NicholasBoll))
This change fixes `aria-selected` in `Combobox.Menu.Item` components, but this does change the visuals of what is considered "selected". If you have any visual tests that have a screenshot of a selected state, the visual regression will have to be updated. The same is true for DOM-based snapshot tests. `aria-selected="true"` will now be added when an item is selected and not just when the virtual cursor is on the item. If your snapshot captures this DOM state, the snapshot will have to be updated.


## [v10.3.50](https://github.com/Workday/canvas-kit/releases/tag/v10.3.50) (2024-08-05)

### Components

- fix(combobox): Use correct state for aria-selected ([#2849](https://github.com/Workday/canvas-kit/pull/2849)) ([@NicholasBoll](https://github.com/NicholasBoll))
This change fixes `aria-selected` in `Combobox.Menu.Item` components, but this does change the visuals of what is considered "selected". If you have any visual tests that have a screenshot of a selected state, the visual regression will have to be updated. The same is true for DOM-based snapshot tests. `aria-selected="true"` will now be added when an item is selected and not just when the virtual cursor is on the item. If your snapshot captures this DOM state, the snapshot will have to be updated.
## [v11.0.24](https://github.com/Workday/canvas-kit/releases/tag/v11.0.24) (2024-08-05)

### Components

- fix(SearchForm): Suppress forwarding props warning ([#2850](https://github.com/Workday/canvas-kit/pull/2850)) ([@thunguyen19](https://github.com/thunguyen19), Thu Nguyen)


## [v11.0.23](https://github.com/Workday/canvas-kit/releases/tag/v11.0.23) (2024-07-30)

### Components

- fix: Support marginTop and marginBottom on ListBox ([#2844](https://github.com/Workday/canvas-kit/pull/2844)) ([@NicholasBoll](https://github.com/NicholasBoll))


## [v10.3.49](https://github.com/Workday/canvas-kit/releases/tag/v10.3.49) (2024-07-29)

### Components

- fix: Support marginTop and marginBottom on ListBox ([#2844](https://github.com/Workday/canvas-kit/pull/2844)) ([@NicholasBoll](https://github.com/NicholasBoll))


## [v11.0.22](https://github.com/Workday/canvas-kit/releases/tag/v11.0.22) (2024-07-29)

### Documentation

- docs: Fix stencil docs typo ([#2847](https://github.com/Workday/canvas-kit/pull/2847)) ([@alanbsmith](https://github.com/alanbsmith))


## [v10.3.48](https://github.com/Workday/canvas-kit/releases/tag/v10.3.48) (2024-07-24)
## [v11.0.21](https://github.com/Workday/canvas-kit/releases/tag/v11.0.21) (2024-07-24)

### Documentation
Expand Down
70 changes: 56 additions & 14 deletions cypress/integration/Autocomplete.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ describe('Autocomplete', () => {
cy.findByRole('combobox').click();
});

context('when the combobox is clicked', () => {
beforeEach(() => {
cy.findByRole('combobox').click();
});

it('should close the menu', () => {
cy.findByRole('listbox').should('not.exist');
});
});

it('should set the aria-owns to reference the listbox element', () => {
cy.findByRole('combobox').should(haveAttrMatchingIdOf('aria-controls', '[role=listbox]'));
});
Expand All @@ -67,6 +77,10 @@ describe('Autocomplete', () => {
cy.findByRole('combobox').should('not.have.attr', 'aria-activedescendant');
});

it('should not have visual focus on any element', () => {
cy.get('[role="option"].focus').should('not.exist');
});

it('should not have aria-selected=true on any elements', () => {
cy.get('[aria-selected=true]').should('not.exist');
});
Expand All @@ -81,12 +95,16 @@ describe('Autocomplete', () => {
cy.findAllByRole('combobox').should('not.have.attr', 'aria-activedescendant');
});

it('should not have visual focus on the first item', () => {
cy.findAllByRole('option').eq(0).should('not.have.class', 'focus');
});

it('should not set aria-selected to the first option', () => {
cy.findAllByRole('option').eq(0).should('have.not.attr', 'aria-selected');
});
});

context('when a value is entered', () => {
context('when "Red" is typed', () => {
beforeEach(() => {
cy.findByRole('combobox').type('Red', {delay: 1});
waitForAutocompleteReady();
Expand Down Expand Up @@ -139,8 +157,8 @@ describe('Autocomplete', () => {
);
});

it('should set aria-selected to the first option', () => {
cy.findAllByRole('option').eq(0).should('have.attr', 'aria-selected', 'true');
it('should set visual focus to the first option', () => {
cy.findAllByRole('option').eq(0).should('have.class', 'focus');
});

context('when the user presses the enter key', () => {
Expand All @@ -156,7 +174,7 @@ describe('Autocomplete', () => {
cy.findByRole('listbox').should('not.exist');
});

context('when the use hits the "2" key', () => {
context('when the user hits the "2" key', () => {
beforeEach(() => {
cy.findAllByRole('combobox').type('2');
waitForAutocompleteReady();
Expand All @@ -173,6 +191,10 @@ describe('Autocomplete', () => {
it.skip('should change the filtered results', () => {
cy.findByRole('option', {name: 'Red Apple 121'}).should('be.visible');
});

it('should set aria-selected to the first option', () => {
cy.findAllByRole('option').eq(0).should('have.attr', 'aria-selected', 'true');
});
});
});

Expand Down Expand Up @@ -230,8 +252,12 @@ describe('Autocomplete', () => {
);
});

it('should set aria-selected to the second option', () => {
cy.findAllByRole('option').eq(1).should('have.attr', 'aria-selected', 'true');
it('should set visual focus on the second option', () => {
cy.findAllByRole('option').eq(1).should('have.class', 'focus');
});

it('should not have aria-selected=true on any elements', () => {
cy.get('[aria-selected=true]').should('not.exist');
});
});

Expand All @@ -253,8 +279,12 @@ describe('Autocomplete', () => {
);
});

it('should set aria-selected to the first option', () => {
cy.findAllByRole('option').eq(0).should('have.attr', 'aria-selected', 'true');
it('should set visual focus on the first option', () => {
cy.findAllByRole('option').eq(0).should('have.class', 'focus');
});

it('should not have aria-selected=true on any elements', () => {
cy.get('[aria-selected=true]').should('not.exist');
});
});

Expand All @@ -269,8 +299,12 @@ describe('Autocomplete', () => {
);
});

it('should set aria-selected to the last option', () => {
cy.findAllByRole('option').eq(3).should('have.attr', 'aria-selected', 'true');
it('should set visual focus on the last option', () => {
cy.findAllByRole('option').eq(3).should('have.class', 'focus');
});

it('should not have aria-selected=true on any elements', () => {
cy.get('[aria-selected=true]').should('not.exist');
});
});

Expand All @@ -285,8 +319,12 @@ describe('Autocomplete', () => {
);
});

it('should set aria-selected to the third option', () => {
cy.findAllByRole('option').eq(2).should('have.attr', 'aria-selected', 'true');
it('should set visual focus on the third option', () => {
cy.findAllByRole('option').eq(2).should('have.class', 'focus');
});

it('should not have aria-selected=true on any elements', () => {
cy.get('[aria-selected=true]').should('not.exist');
});
});

Expand All @@ -300,8 +338,12 @@ describe('Autocomplete', () => {
);
});

it('should set aria-selected to the first option', () => {
cy.findAllByRole('option').eq(0).should('have.attr', 'aria-selected', 'true');
it('should set visual focus on the first option', () => {
cy.findAllByRole('option').eq(0).should('have.class', 'focus');
});

it('should not have aria-selected=true on any elements', () => {
cy.get('[aria-selected=true]').should('not.exist');
});
});
});
Expand Down
12 changes: 6 additions & 6 deletions cypress/integration/Modal.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ describe('Modal', () => {
cy.findByRole('dialog', {name: 'MIT License'}).should('have.attr', 'aria-labelledby');
});

it('should have an aria-modal=true', () => {
it('should have an aria-modal=false', () => {
cy.findByRole('dialog', {name: 'MIT License'}).should(
'have.attr',
'aria-modal',
'true'
'false'
);
});

Expand Down Expand Up @@ -384,8 +384,8 @@ describe('Modal', () => {
cy.findByRole('dialog', {name: 'Delete Item'}).should('have.attr', 'aria-labelledby');
});

it('should have an aria-modal=true', () => {
cy.findByRole('dialog', {name: 'Delete Item'}).should('have.attr', 'aria-modal', 'true');
it('should have an aria-modal=false', () => {
cy.findByRole('dialog', {name: 'Delete Item'}).should('have.attr', 'aria-modal', 'false');
});

it('should contain the title', () => {
Expand Down Expand Up @@ -483,11 +483,11 @@ describe('Modal', () => {
);
});

it('should have an aria-modal=true', () => {
it('should have an aria-modal=false', () => {
cy.findByRole('dialog', {name: 'Acknowledge License'}).should(
'have.attr',
'aria-modal',
'true'
'false'
);
});

Expand Down
Loading

0 comments on commit e249801

Please sign in to comment.