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
This is something I would write. GJ