I found 2 ways of marking a zone with aria-
attributes.
First one:
<div class="main" role="main" aria-label="Search results">
<a href="">Blah-blah</a>
Second one:
<div class="main" role="main" aria-labelledby="res1">
<h2 id="res1" class="a11y">Search results</h2>
<a href="">Blah-blah</a>
JAWS reads them absolutely the same. So, what is the difference and what would you choose?
This site gives the reason for your answer:-
everything here is using aria-labelledby and VoiceOver will read the button as “First item Outer group button”. In other words, the button label, the group label and then the type of object.
However, if you change any of the elements to use aria-label, for example:
VoiceOver will now read the button as simple “First item button”. It doesn’t seem to matter which item uses aria-label, if it’s anywhere in the hierarchy, only the label for the button itself will be read out.
From the MDN:-
And this:-