I've never encountered this before, but I was just thinking--what comes first; psuedo-classes or attribute selectors?
It doesn’t matter. From the CSS 2.1 Specification:
Pseudo-classes are allowed anywhere in selectors while pseudo-elements may only be appended after the last simple selector of the selector.
:hover is a pseudo-class and not a pseudo-element, it can appear anywhere in the selector. Both
a:hover[attr=value] will produce the same result.
If you want to use a pseudo-element, however, you’d have to put it last. For example,
p[attr=value]:first-letter would work, whereas
p:first-letter[attr=value] would not.
you get the element you want with a[attr=value] and then you specify the hover state with :hover so hover comes last!
The attribute is on the element so the [attr=value] comes first