Skip to content

Commit

Permalink
bug: fix summary being treated as non-interactive
Browse files Browse the repository at this point in the history
  • Loading branch information
khiga8 committed May 6, 2024
1 parent 0d5321a commit 053a70a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions __mocks__/genInteractives.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const interactiveElementsMap = {
menuitem: [],
option: [],
select: [],
summary: [],
// Whereas ARIA makes a distinction between cell and gridcell, the AXObject
// treats them both as CellRole and since gridcell is interactive, we consider
// cell interactive as well.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/src/rules/no-static-element-interactions-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const alwaysValid = [
{ code: '<audio onClick={() => {}} />;' },
{ code: '<form onClick={() => {}} />;' },
{ code: '<form onSubmit={() => {}} />;' },
{ code: '<summary onClick={() => {}} />;' },
/* HTML elements attributed with an interactive role */
{ code: '<div role="button" onClick={() => {}} />;' },
{ code: '<div role="checkbox" onClick={() => {}} />;' },
Expand Down Expand Up @@ -340,7 +341,6 @@ const neverValid = [
{ code: '<span onClick={() => {}} />;', errors: [expectedError] },
{ code: '<strike onClick={() => {}} />;', errors: [expectedError] },
{ code: '<style onClick={() => {}} />;', errors: [expectedError] },
{ code: '<summary onClick={() => {}} />;', errors: [expectedError] },
{ code: '<title onClick={() => {}} />;', errors: [expectedError] },
{ code: '<track onClick={() => {}} />;', errors: [expectedError] },
{ code: '<tt onClick={() => {}} />;', errors: [expectedError] },
Expand Down

0 comments on commit 053a70a

Please sign in to comment.