attachDom: Refactor and update setters

- Refactor tests to use most recent best practices
- Extract "value" and "checked" setters into functions so they can be overloaded