consistently check 'checked' and 'selected' attributes