yardz commented on a change in pull request #13179:
URL: https://github.com/apache/superset/pull/13179#discussion_r577841732



##########
File path: superset-frontend/src/components/Loading/index.tsx
##########
@@ -41,12 +42,16 @@ const LoaderImg = styled.img`
     transform: translate(-50%, -50%);
   }
 `;
-export default function Loading({ position = 'floating' }: Props) {
+export default function Loading({
+  position = 'floating',
+  image = '/static/assets/images/loading.gif',
+}: Props) {
   return (
     <LoaderImg
       className={`loading ${position}`}
       alt="Loading..."
-      src="/static/assets/images/loading.gif"
+      src={image}
+      data-test-id="loading"

Review comment:
       We did a review here and they told me that.
   I did a little research here and it seems to me that aria-busy should be 
used in the element that will have its content "changed" (in this case it would 
be the tag that includes this component and not the Loading component).
   
   Same examples:
   https://accessibilityresources.org/aria-busy
   <img width="764" alt="Captura de Tela 2021-02-17 às 3 15 59 PM" 
src="https://user-images.githubusercontent.com/1014611/108248807-14baf680-7133-11eb-98c1-03f1bfdbff21.png";>
   
   http://sap.github.io/techne/loading-spinner.html#usage-with-other-elements
   <img width="958" alt="Captura de Tela 2021-02-17 às 3 16 45 PM" 
src="https://user-images.githubusercontent.com/1014611/108248905-2bf9e400-7133-11eb-9405-b82c26934807.png";>
   
   
   It seems to me more appropriate to use just `aria-live="polite"` instead of 
`aria-busy=true` (on Loading component)
   https://bitsofco.de/using-aria-live/
   
   Do you agree with that? I'm quite a noob in this accessibility rules lol




----------------------------------------------------------------
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