In the context of mw.widgets.TitleInputWidget#setTitle(), mw.widgets.TitleWidget.prototype.getTitle() is used instead of OO.ui.mixin.TitledElement.prototype.getTitle() and that produces a wrong value for the HTML title attribute.
|mediawiki/core : master||[BREAKING CHANGE] Rename TitleWidget#getTitle to TitleWidget#getMWTitle|
|oojs/ui : master||Ensure TitledElement mixin uses the right title|
TitleWidget should be the one that adjusts here, in my opinion, since 'title' in this case is for HTML properties, rather than having the mixin allow for things it wasn't designed for.
The TitleWidget is mixing two concepts -- title as in Mediawiki Title object, and title as in the HTML property (which is what the mixin if for). I agree with the mixin internally using this.title instead of this.getTitle() but honestly, the TitleWidget -- since it's using TitledElement, should know better, and use a different definition of the MW Title or it should call it something else, OR it should not use TitledElement.
The term "title" having 2 different meanings is the problem here; I don't think the solution is necessarily changing the mixin.
(Sidepoint that I also wrote in the patch -- if we do remove the method, we must deprecate it first, since it's heavily used everywhere else)