Add the `Widget::addAttribute()` method (see #4744)