davidhu2000/react-spinners

Support for ALT Text or Aria labels

khibma opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
I was looking to add alt-text or better yet, aria-labels to the spinners to make them more accessible.

Describe the solution you'd like
I've tried adding a span or straight text into the loader; nothing will render on screen, nor do I see it in the generated source. I've also tried adding aria-labels to the component, but they appear to be ignored.

  <ClockLoader
       css={override}
       size={20}
       color={"#000"}
       loading={this.state.spinner}
       aria-label = "loading"      
     > 
       
       Working....
       {/* screen-reader-only */}
       <span className='sr-only'>Generating report</span>
     </ClockLoader>

that's a good idea. i can probably just allow all additional props so you can add as many as you need, even data props should work. i think this could be a good feature to implement.

this is supported in 0.13.0-alpha.4