IAccessibleText::getAttributes() method to get text attributes. Refer to Gecko text attributes to get list of supported text attributes.
We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS