Some screen readers will not read alt text if it is too long, or they will break it up in confusing ways. It would be nice to have a rule to help prevent this. I've seen different recommendations, usually somewhere around 100 – 150 characters.
This may be a little outdated, but it says JAWS partitions it at 125 characters. We can make that default
This is probably going to be difficult to test with lint. I'd imagine the alt attribute value will be assigned via variable in most cases. We'll probably not end up with many cases where this rule would apply.
The rule, however, would be a good basis for a propType/flow type that did a runtime check
@jessebeach we can make sure to only test for literal string values and can include this in the alt-text rule without having the baggage of adding another rule. it could help people working on static sites.
it could help people working on static sites.
Fair point.