| <!-- |
| @BLINK-ALLOW:selectedFromFocus* |
| @MAC-ALLOW:AXSelected=* |
| @EXECUTE-AND-WAIT-FOR:markTab2Selected() |
| --> |
| <html> |
| <body> |
| <div role="tablist"> |
| <button role="tab" id="tab1">tab1</button> |
| <button role="tab" id="tab2">tab2</button> |
| <button role="tab">tab3</button> |
| </div> |
| </body> |
| |
| <script> |
| function markTab2Selected() { |
| document.getElementById('tab2').ariaSelected = true; |
| document.title = 'Done'; |
| return 'Done'; |
| } |
| // Setting focus on "tab1" will result it being selected. |
| document.getElementById("tab1").focus(); |
| </script> |
| |
| </html> |