The dependency on the Universal Language Selector should be optional: Wikibase should make use of the ULS functionality if present, but degrade gracefully if it's not there.
As to the language directionality information we usually take from ULS: ideally, just don't set the dir attribute at all if we don't have directionality info. Or set it to an empty string (though that's not valid HTML). If all else fails, use ltr.
Version: unspecified
Severity: normal