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 authored and ljharb committed Sep 4, 2024
1 parent 83fd9c4 commit f842fde
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 @@ -49,6 +49,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 @@ -86,6 +86,7 @@ const alwaysValid = [
{ code: '<form onClick={() => {}} />;' },
{ code: '<form onSubmit={() => {}} />;' },
{ code: '<link onClick={() => {}} href="#" />;' },
{ code: '<summary onClick={() => {}} />;' },
/* HTML elements attributed with an interactive role */
{ code: '<div role="button" onClick={() => {}} />;' },
{ code: '<div role="checkbox" onClick={() => {}} />;' },
Expand Down Expand Up @@ -339,7 +340,6 @@ const neverValid = [
{ code: '<style onClick={() => {}} />;', errors: [expectedError] },
{ code: '<sub onClick={() => {}} />;', errors: [expectedError] },
{ code: '<sup 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 f842fde

Please sign in to comment.