I'm not sure if it's actually required by law, but usual retailers have been communicating a lot on this in the last year. Most of them display a sticker in their stores, but the score is also prominently shown on their websites[0][1]. I'm really not surprised that a lot of people willing to buy something noticed the repairability score, because it's near impossible to miss it.
Yep, it is required by law to have the repairability index score posted prominently near the price tag of the product, whether online or in physical retail. It’s a super effective approach (as noted in the linked study).