CSS nothing does with accessibility (except contrast ratio and font sizes which users can configure themselves in most cases), however, HTML itself does and a lot.
Just use right semantic tags and ARIA attributes whenever you need and like you want. If you want to focus input located above and not below when I press tab, you can do that with tabindex.
In modern apps don't forget to update all the required ARIA attributes with JS.