For selecting things, I've found that allowing a "data-test='user-name-input'" type attribute is useful for a lot of cases, when doing Gauge/Taiko tests.
It might make sense to allow/recognize these to save trying to find things that way, rather than via CSS-type selectors that may change.