Assistive technologies interpret Web page through various mechanisms. Some will rely on the browser to construct the DOM and it will interact directly with the browser to get information. Others will communicate directly with the operating system and whatever information the browser passes to it. Other still can take the raw HTML and build the page itself.
To ensure you have valid code, simply run your code through a code validator, like the W3C Code Validator. There are many other tools available that incorporate the same test suite as the W3C Validator.
Note: ARIA attributes will be marked as errors in some Web pages like pre-HTML5 pages. ARIA attributes are fine to use in pre-HTML5 documents. If these errors are the only ones you receive from the validator, your page is fine. ARIA attributes should not be left out simply because they do not validate – they offer a huge benefit for accessibility and browsers know how to handle the attributes.