yardz commented on pull request #13422:
URL: https://github.com/apache/superset/pull/13422#issuecomment-789751407


   > Try to access the elements by role instead of test-id which is not 
accessible to the users. You can use one of the predefined roles rowgroup, row, 
columnheader, and cell.
   
   These `role` are when you simulate a table with other elements (for example, 
with `<div>`). For tables, you should not place a same `<table role="table">`.
   The link you sent says this: "The table value of the ARIA role attribute 
identifies the element containing the role as having a non-interactive table 
structure containing data arranged in rows and columns, similar to the native 
`<table>` HTML element." and this "Realize, it is much simpler to use the 
`<table>` element, along with all the related semantic elements and attributes 
that are all supported by all assistive technologies."
   
   Specifically in this case, adding the `role` does not seem like a good 
option/best practices.
   
   
   > Try to change the focus more to how the **user** will perceive the 
different component states.
   
   The ideal was in fact to do this, and to proceed as an "integration test". 
However, `react-tables` are very complex, so creating the data for the test is 
extremely complex (so it is very easy to get it wrong).
   
   As this component only calls two other components, I followed the unit 
testing strategy, where I only check the props. And emphasizing this component 
has no "interaction with the user" only display.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to