See Making Custom Components Accessible and Examples that Use the Accessibility API for more information.